summaryrefslogtreecommitdiffstats
path: root/test/SCCS
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2009-02-06 14:55:23 (GMT)
committerSteven Knight <knight@baldmt.com>2009-02-06 14:55:23 (GMT)
commite112f6b49c9063e6a584ff4f7abf9d7a644eef30 (patch)
tree978573b4ff11f036428c0a08a89085313ad990fa /test/SCCS
parent9405dad6e18db3934eec7b992e12a2016b1466db (diff)
downloadSCons-e112f6b49c9063e6a584ff4f7abf9d7a644eef30.zip
SCons-e112f6b49c9063e6a584ff4f7abf9d7a644eef30.tar.gz
SCons-e112f6b49c9063e6a584ff4f7abf9d7a644eef30.tar.bz2
Commonize new string-search-in-output methods:
test.must_contain_all_lines() test.must_contain_any_line() test.must_not_contain_any_line() Update tests to use them. Remove "import string" lines where the change made them unnecessary.
Diffstat (limited to 'test/SCCS')
-rw-r--r--test/SCCS/diskcheck.py9
-rw-r--r--test/SCCS/explicit.py9
-rw-r--r--test/SCCS/implicit.py9
-rw-r--r--test/SCCS/transparent.py9
4 files changed, 4 insertions, 32 deletions
diff --git a/test/SCCS/diskcheck.py b/test/SCCS/diskcheck.py
index ee29143..1845dc3 100644
--- a/test/SCCS/diskcheck.py
+++ b/test/SCCS/diskcheck.py
@@ -123,14 +123,7 @@ cat(["sub/fff.out"], ["sub/fff.in"])
cat(["sub/all"], ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
""", '\n')
-stdout = test.stdout()
-missing = filter(lambda l, s=stdout: string.find(s, l) == -1, lines)
-if missing:
- print "Missing the following output lines:"
- print string.join(missing, '\n')
- print "Actual STDOUT =========="
- print stdout
- test.fail_test(1)
+test.must_contain_all_lines(test.stdout(), lines)
test.must_match('all', """\
s.aaa.in aaa.in
diff --git a/test/SCCS/explicit.py b/test/SCCS/explicit.py
index 0a52ace..dbfcb51 100644
--- a/test/SCCS/explicit.py
+++ b/test/SCCS/explicit.py
@@ -109,14 +109,7 @@ cat(["sub/fff.out"], ["sub/fff.in"])
cat(["sub/all"], ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
""", '\n')
-stdout = test.stdout()
-missing = filter(lambda l, s=stdout: string.find(s, l) == -1, lines)
-if missing:
- print "Missing the following output lines:"
- print string.join(missing, '\n')
- print "Actual STDOUT =========="
- print stdout
- test.fail_test(1)
+test.must_contain_all_lines(test.stdout(), lines)
test.must_match('all', """\
%F% aaa.in
diff --git a/test/SCCS/implicit.py b/test/SCCS/implicit.py
index eca8e0c..aa5501f 100644
--- a/test/SCCS/implicit.py
+++ b/test/SCCS/implicit.py
@@ -75,14 +75,7 @@ sccs get foo.c
sccs get foo.h
""", '\n')
-stdout = test.stdout()
-missing = filter(lambda l, s=stdout: string.find(s, l) == -1, lines)
-if missing:
- print "Missing the following output lines:"
- print string.join(missing, '\n')
- print "Actual STDOUT =========="
- print stdout
- test.fail_test(1)
+test.must_contain_all_lines(test.stdout(), lines)
diff --git a/test/SCCS/transparent.py b/test/SCCS/transparent.py
index 384e27c..82577d2 100644
--- a/test/SCCS/transparent.py
+++ b/test/SCCS/transparent.py
@@ -109,14 +109,7 @@ cat(["sub/fff.out"], ["sub/fff.in"])
cat(["sub/all"], ["sub/ddd.out", "sub/eee.out", "sub/fff.out"])
""", '\n')
-stdout = test.stdout()
-missing = filter(lambda l, s=stdout: string.find(s, l) == -1, lines)
-if missing:
- print "Missing the following output lines:"
- print string.join(missing, '\n')
- print "Actual STDOUT =========="
- print stdout
- test.fail_test(1)
+test.must_contain_all_lines(test.stdout(), lines)
test.must_match('all', """\
s.aaa.in aaa.in