diff options
| author | Steven Knight <knight@baldmt.com> | 2004-08-30 23:57:47 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2004-08-30 23:57:47 (GMT) |
| commit | f09896916e7eb4fbd1d334d22e99e6b8d8a64696 (patch) | |
| tree | 54428428d22e29966e91633ad19790f8ab6fb391 /test | |
| parent | 96cb20e235d66ab6ca7f50e2a1a9dc60d34d85db (diff) | |
| download | SCons-f09896916e7eb4fbd1d334d22e99e6b8d8a64696.zip SCons-f09896916e7eb4fbd1d334d22e99e6b8d8a64696.tar.gz SCons-f09896916e7eb4fbd1d334d22e99e6b8d8a64696.tar.bz2 | |
Allow Help() to be called multiple times, appending to the text each time. (Chad Austin)
Diffstat (limited to 'test')
| -rw-r--r-- | test/Help.py | 22 | ||||
| -rw-r--r-- | test/Options.py | 14 | ||||
| -rw-r--r-- | test/OptionsTypes.py | 5 |
3 files changed, 37 insertions, 4 deletions
diff --git a/test/Help.py b/test/Help.py index ea356ba..d6e71ea 100644 --- a/test/Help.py +++ b/test/Help.py @@ -60,4 +60,26 @@ Use scons -H for help about command-line options. test.run(arguments = '-h', stdout = expect) +test.write('SConstruct', r""" +Help('\nMulti') +Help('line\n') +Help('''\ +help +text! +''') +""") + +expect = """\ +scons: Reading SConscript files ... +scons: done reading SConscript files. + +Multiline +help +text! + +Use scons -H for help about command-line options. +""" + +test.run(arguments = '-h', stdout = expect) + test.pass_test() diff --git a/test/Options.py b/test/Options.py index c98ffc6..d9bfd17 100644 --- a/test/Options.py +++ b/test/Options.py @@ -141,7 +141,14 @@ test.run(arguments='"DEBUG_BUILD=1"') check(['1', '1', cc, string.strip(ccflags + ' -O -g'), 'v', 'v']) test.run(arguments='-h', - stdout = """scons: Reading SConscript files ... + stdout = """\ +scons: Reading SConscript files ... +1 +0 +%s +%s +v +v scons: done reading SConscript files. Variables settable in custom.py or on the command line: @@ -166,7 +173,7 @@ UNSPECIFIED: An option with no value actual: None Use scons -H for help about command-line options. -"""%cc) +"""%(cc, ccflags and ccflags + ' -O' or '-O', cc)) # Test saving of options and multi loading # @@ -288,7 +295,8 @@ Help('Variables settable in custom.py or on the command line:\\n' + opts.Generat """) test.run(arguments='-h', - stdout = """scons: Reading SConscript files ... + stdout = """\ +scons: Reading SConscript files ... scons: done reading SConscript files. Variables settable in custom.py or on the command line: diff --git a/test/OptionsTypes.py b/test/OptionsTypes.py index 55cf035..5fef257 100644 --- a/test/OptionsTypes.py +++ b/test/OptionsTypes.py @@ -346,7 +346,10 @@ Default(env.Alias('dummy', None)) test.run(arguments='-h', - stdout = """scons: Reading SConscript files ... + stdout = """\ +scons: Reading SConscript files ... +1 +0 scons: done reading SConscript files. warnings: compilation with -Wall and similiar (yes|no) |
