Move 2.0 changes collected in branches/pending back to trunk for further
[scons.git] / test / PRINT_CMD_LINE_FUNC.py
index a95b181dad702e836d87436df11795243723c9d8..faa51ace7200f1df54bec111edf10a74c997c25c 100644 (file)
@@ -28,15 +28,12 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
 Test the PRINT_CMD_LINE_FUNC construction variable.
 """
 
-import string
-import sys
-import TestCmd
 import TestSCons
 
 _exe = TestSCons._exe
 _obj = TestSCons._obj
 
-test = TestSCons.TestSCons(match = TestCmd.match_re)
+test = TestSCons.TestSCons(match = TestSCons.match_re)
 
 
 test.write('SConstruct', r"""
@@ -60,14 +57,7 @@ expected_lines = [
     "BUILDING prog%s from prog%s with" % (_exe, _obj),
 ]
 
-missing_lines = filter(lambda l: string.find(test.stdout(), l) == -1,
-                       expected_lines)
-if missing_lines:
-    print "Expected the following lines in STDOUT:"
-    print "\t" + string.join(expected_lines, "\n\t")
-    print "ACTUAL STDOUT =========="
-    print test.stdout()
-    test.fail_test(1)
+test.must_contain_all_lines(test.stdout(), expected_lines)
 
 test.run(arguments = '-c .')
 
@@ -81,3 +71,9 @@ e.Program(target = 'prog', source = 'prog.c')
 test.run(arguments = '-Q .')
 
 test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4: