diff options
author | Dirk Baechle <dl9obn@darc.de> | 2012-12-16 17:56:16 (GMT) |
---|---|---|
committer | Dirk Baechle <dl9obn@darc.de> | 2012-12-16 17:56:16 (GMT) |
commit | 78785a796c5cb080dc6a0e7bc99c720a349b3859 (patch) | |
tree | 53e4be521ebf4c4f65c14c9e68b64b5327bf61c4 /test/Interactive/shell.py | |
parent | 1bf9aa83fc024950012dd76d110443fc2d30c92a (diff) | |
download | SCons-78785a796c5cb080dc6a0e7bc99c720a349b3859.zip SCons-78785a796c5cb080dc6a0e7bc99c720a349b3859.tar.gz SCons-78785a796c5cb080dc6a0e7bc99c720a349b3859.tar.bz2 |
- extended the must_contain* methods of the test framework, such that they all support user-defined find/search functions
- relaxed several of the regex comparisons for better cross-platform compatibility
Diffstat (limited to 'test/Interactive/shell.py')
-rw-r--r-- | test/Interactive/shell.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/Interactive/shell.py b/test/Interactive/shell.py index f4e89bd..842a12e 100644 --- a/test/Interactive/shell.py +++ b/test/Interactive/shell.py @@ -83,21 +83,21 @@ scons.send("build foo.out\n") scons.send("\n") if sys.platform == 'win32': - no_such_error = "'no_such_command' is not recognized as an internal or external command,\noperable program or batch file." + no_such_error = r"('no_such_command' is not recognized as an internal or external command,\s+operable program or batch file\.|Der Befehl \"no_such_command\" ist entweder falsch geschrieben oder\s+konnte nicht gefunden werden\.)" else: no_such_error = 'scons: no_such_command: No such file or directory' expect_stdout = """\ -scons>>> Copy("foo.out", "foo.in") -Touch("1") +scons>>> Copy\("foo.out", "foo.in"\) +Touch\("1"\) scons>>> hello from shell_command.py -scons>>> !%(_python_)s %(_shell_command_py_)s +scons>>> ![^"]+ ".*" hello from shell_command.py scons>>> hello from shell_command.py -scons>>> shell %(_python_)s %(_shell_command_py_)s +scons>>> shell [^"]+ ".*" hello from shell_command.py scons>>> hello from shell_command.py -scons>>> sh %(_python_)s %(_shell_command_py_)s +scons>>> sh [^"]+ ".*" hello from shell_command.py scons>>> %(no_such_error)s scons>>> !no_such_command arg1 arg2 @@ -108,9 +108,9 @@ scons: `foo.out' is up to date. scons>>> """ % locals() -test.finish(scons, stdout = expect_stdout) - +test.finish(scons, stdout = None) +test.must_contain_all_lines(test.stdout(), expect_stdout.splitlines(), find=TestSCons.search_re) test.pass_test() |