summaryrefslogtreecommitdiffstats
path: root/test/option-unknown.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-09-29 03:04:07 (GMT)
committerSteven Knight <knight@baldmt.com>2001-09-29 03:04:07 (GMT)
commit8a28cfb1801cbada701e471b7ca9ea78db137221 (patch)
tree0f6709bb1973c4e903c2dda9e3fb1862b2194d8a /test/option-unknown.py
parent1740dba381b84692daa6b8e01eb4a52bf61330de (diff)
downloadSCons-8a28cfb1801cbada701e471b7ca9ea78db137221.zip
SCons-8a28cfb1801cbada701e471b7ca9ea78db137221.tar.gz
SCons-8a28cfb1801cbada701e471b7ca9ea78db137221.tar.bz2
Add a test for unknown options (both short and long).
Diffstat (limited to 'test/option-unknown.py')
-rw-r--r--test/option-unknown.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/option-unknown.py b/test/option-unknown.py
new file mode 100644
index 0000000..28d3ceb
--- /dev/null
+++ b/test/option-unknown.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestSCons
+import string
+import sys
+
+test = TestSCons.TestSCons()
+
+test.write('SConstruct', "")
+
+test.run(arguments = '-Z',
+ stderr = '\nSCons error: option -Z not recognized\nFile "\S+", line \d+, in short_has_arg\n')
+
+test.run(arguments = '--ZizzerZazzerZuzz',
+ stderr = '\nSCons error: option --ZizzerZazzerZuzz not recognized\nFile "\S+", line \d+, in long_has_args\n')
+
+test.pass_test()
+