summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/SCONSFLAGS.py11
-rw-r--r--test/option--profile.py8
-rw-r--r--test/option-unknown.py14
3 files changed, 16 insertions, 17 deletions
diff --git a/test/SCONSFLAGS.py b/test/SCONSFLAGS.py
index f8d757a..2d0ac8d 100644
--- a/test/SCONSFLAGS.py
+++ b/test/SCONSFLAGS.py
@@ -29,7 +29,7 @@ import TestSCons
import os
import string
-test = TestSCons.TestSCons(match = TestCmd.match_re)
+test = TestSCons.TestSCons()
wpath = test.workpath()
@@ -59,11 +59,10 @@ test.fail_test(string.find(test.stdout(), '-H, --help-options') == -1)
os.environ['SCONSFLAGS'] = '-Z'
-test.run(arguments = "-H", stderr = r"""
-SCons warning: SCONSFLAGS option -Z not recognized
-File "[^"]*", line \d+, in \S+
-""")
+test.run(arguments = "-H", status = 2,
+ stderr = r"""usage: scons [OPTION] [TARGET] ...
-test.fail_test(string.find(test.stdout(), '-H, --help-options') == -1)
+SCons error: no such option: -Z
+""")
test.pass_test()
diff --git a/test/option--profile.py b/test/option--profile.py
index 6d7efe4..5ba9c46 100644
--- a/test/option--profile.py
+++ b/test/option--profile.py
@@ -49,9 +49,9 @@ stats.strip_dirs().print_stats()
s = sys.stdout.getvalue()
test.fail_test(string.find(s, '__init__.py') == -1)
-test.fail_test(string.find(s, 'option_v') == -1)
+test.fail_test(string.find(s, 'print_version') == -1)
test.fail_test(string.find(s, 'SCons.Script.main()') == -1)
-test.fail_test(string.find(s, 'getopt.py') == -1)
+test.fail_test(string.find(s, 'option_parser.py') == -1)
scons_prof = test.workpath('scons2.prof')
@@ -70,9 +70,9 @@ stats.strip_dirs().print_stats()
s = sys.stdout.getvalue()
test.fail_test(string.find(s, '__init__.py') == -1)
-test.fail_test(string.find(s, 'option_v') == -1)
+test.fail_test(string.find(s, 'print_version') == -1)
test.fail_test(string.find(s, 'SCons.Script.main()') == -1)
-test.fail_test(string.find(s, 'getopt.py') == -1)
+test.fail_test(string.find(s, 'option_parser.py') == -1)
test.pass_test()
diff --git a/test/option-unknown.py b/test/option-unknown.py
index 496a7e0..7ddad94 100644
--- a/test/option-unknown.py
+++ b/test/option-unknown.py
@@ -29,21 +29,21 @@ import TestSCons
import string
import sys
-test = TestSCons.TestSCons(match = TestCmd.match_re)
+test = TestSCons.TestSCons()
test.write('SConstruct', "")
test.run(arguments = '-Z',
- stderr = """
-SCons error: option -Z not recognized
-File "\S+", line \d+, in short_has_arg
+ stderr = """usage: scons [OPTION] [TARGET] ...
+
+SCons error: no such option: -Z
""",
status = 2)
test.run(arguments = '--ZizzerZazzerZuzz',
- stderr = """
-SCons error: option --ZizzerZazzerZuzz not recognized
-File "\S+", line \d+, in long_has_args
+ stderr = """usage: scons [OPTION] [TARGET] ...
+
+SCons error: no such option: --ZizzerZazzerZuzz
""",
status = 2)