summaryrefslogtreecommitdiffstats
path: root/test/Options
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-11-23 18:03:51 (GMT)
committerSteven Knight <knight@baldmt.com>2004-11-23 18:03:51 (GMT)
commitaecc084531f05e110277d52d560b3e3c17fbf09a (patch)
tree63602bf0f3d05e3db2f3fb295f530302d6463b46 /test/Options
parent9ee53a60a770d6f5a33624405d35ad4063378367 (diff)
downloadSCons-aecc084531f05e110277d52d560b3e3c17fbf09a.zip
SCons-aecc084531f05e110277d52d560b3e3c17fbf09a.tar.gz
SCons-aecc084531f05e110277d52d560b3e3c17fbf09a.tar.bz2
Add the ability to map keywords to ListOption (like we already do with EnumOption).
Diffstat (limited to 'test/Options')
-rw-r--r--test/Options/ListOption.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/test/Options/ListOption.py b/test/Options/ListOption.py
index 3f0c426..5dbe0c3 100644
--- a/test/Options/ListOption.py
+++ b/test/Options/ListOption.py
@@ -51,7 +51,8 @@ opts.AddOptions(
ListOption('shared',
'libraries to build as shared libraries',
'all',
- names = list_of_libs),
+ names = list_of_libs,
+ map = {'GL':'gl', 'QT':'qt'}),
)
env = Environment(options=opts)
@@ -77,13 +78,17 @@ test.run(arguments='shared=x11,ical')
check(['ical,x11', '1', 'ical x11', 'ical x11'])
test.run(arguments='shared=x11,,ical,,')
check(['ical,x11', '1', 'ical x11', 'ical x11'])
+test.run(arguments='shared=GL')
+check(['gl', '0', 'gl', 'gl'])
+test.run(arguments='shared=QT,GL')
+check(['gl,qt', '0', 'gl qt', 'gl qt'])
test.run(arguments='shared=foo',
stderr = """
scons: *** Error converting option: shared
Invalid value(s) for option: foo
-File "SConstruct", line 14, in ?
+File "SConstruct", line 15, in ?
""", status=2)
# be paranoid in testing some more combinations
@@ -92,28 +97,28 @@ test.run(arguments='shared=foo,ical',
stderr = """
scons: *** Error converting option: shared
Invalid value(s) for option: foo
-File "SConstruct", line 14, in ?
+File "SConstruct", line 15, in ?
""", status=2)
test.run(arguments='shared=ical,foo',
stderr = """
scons: *** Error converting option: shared
Invalid value(s) for option: foo
-File "SConstruct", line 14, in ?
+File "SConstruct", line 15, in ?
""", status=2)
test.run(arguments='shared=ical,foo,x11',
stderr = """
scons: *** Error converting option: shared
Invalid value(s) for option: foo
-File "SConstruct", line 14, in ?
+File "SConstruct", line 15, in ?
""", status=2)
test.run(arguments='shared=foo,x11,,,bar',
stderr = """
scons: *** Error converting option: shared
Invalid value(s) for option: foo,bar
-File "SConstruct", line 14, in ?
+File "SConstruct", line 15, in ?
""", status=2)
test.write('SConstruct', """