summaryrefslogtreecommitdiffstats
path: root/test/GetOption
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2021-05-11 17:11:29 (GMT)
committerMats Wichmann <mats@linux.com>2021-05-11 17:11:29 (GMT)
commit91d46fc9be159ad0455b03eb00916bee3d2c3ee6 (patch)
tree4e810fe6dc124bb9c946c2c1b56f3eb02f76d008 /test/GetOption
parenta3bb2b9f4235072e5e39e73e7568ab2633368040 (diff)
downloadSCons-91d46fc9be159ad0455b03eb00916bee3d2c3ee6.zip
SCons-91d46fc9be159ad0455b03eb00916bee3d2c3ee6.tar.gz
SCons-91d46fc9be159ad0455b03eb00916bee3d2c3ee6.tar.bz2
Update the documentation for GetOption
Since working on Get/SetOption anyway via tests, update the documentation as well. GetOption now has a table (instead of a spread out list) to match SetOption, and the available vars are all listed, as well as a note on AddOption'd vars. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test/GetOption')
-rw-r--r--test/GetOption/GetSetOption.py3
-rw-r--r--test/GetOption/help.py6
2 files changed, 5 insertions, 4 deletions
diff --git a/test/GetOption/GetSetOption.py b/test/GetOption/GetSetOption.py
index e773ec6..3ab3e7b 100644
--- a/test/GetOption/GetSetOption.py
+++ b/test/GetOption/GetSetOption.py
@@ -32,7 +32,8 @@ import TestSCons
test = TestSCons.TestSCons()
test.write('SConstruct', """
-env = Environment()
+DefaultEnvironment(tools=[])
+env = Environment(tools=[])
option_list = ['clean', 'implicit_cache', 'max_drift', 'num_jobs']
val = 1
for option in option_list:
diff --git a/test/GetOption/help.py b/test/GetOption/help.py
index ebca99f..4db4bc8 100644
--- a/test/GetOption/help.py
+++ b/test/GetOption/help.py
@@ -39,14 +39,14 @@ else:
print("no help for you")
""")
-test.run(arguments = '-q -Q', stdout = "no help for you\n")
+test.run(arguments='-q -Q', stdout="no help for you\n")
expect = "GetOption('help') set"
-test.run(arguments = '-q -Q -h')
+test.run(arguments='-q -Q -h')
test.fail_test(test.stdout().split('\n')[0] != expect)
-test.run(arguments = '-q -Q --help')
+test.run(arguments='-q -Q --help')
test.fail_test(test.stdout().split('\n')[0] != expect)
test.pass_test()