summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2020-08-23 14:12:37 (GMT)
committerMats Wichmann <mats@linux.com>2020-08-23 23:35:39 (GMT)
commitc1acf2f557a0e99ef8f97d694f346e8c10ba6b97 (patch)
treec3b83a2127a6a3b931d956a857d86003d842dc03 /test
parentefc1ae12f3086630005451f3d1855f44a3e530a3 (diff)
downloadSCons-c1acf2f557a0e99ef8f97d694f346e8c10ba6b97.zip
SCons-c1acf2f557a0e99ef8f97d694f346e8c10ba6b97.tar.gz
SCons-c1acf2f557a0e99ef8f97d694f346e8c10ba6b97.tar.bz2
Reject abbreviations of AddOption options.
If a cmdline option is left over, and looks like an abbreviation of an AddOption'd option, raise an error. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test')
-rw-r--r--test/AddOption/longopts.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/AddOption/longopts.py b/test/AddOption/longopts.py
index 47ae4f1..0fcaa5b 100644
--- a/test/AddOption/longopts.py
+++ b/test/AddOption/longopts.py
@@ -51,6 +51,16 @@ test.run('-Q -q . --myargument=helloworld',
test.run('-Q -q . --myarg=helloworld',
stdout="myargument: gully\nmyarg: helloworld\n")
+# Issue #3653: add a check for an abbreviation which never gets AddOption'd.
+test.run('-Q -q . --myargumen=helloworld', status=2,
+ stdout="myargument: gully\nmyarg: balla\n",
+ stderr="""\
+usage: scons [OPTION] [TARGET] ...
+
+SCons Error: no such option: cannot use abbreviated option --myargumen, use --myargument instead
+""")
+
+
test.pass_test()
# Local Variables: