Fixes for use of regular expression with must_contain_all_lines().
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 6 Feb 2009 19:31:50 +0000 (19:31 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Fri, 6 Feb 2009 19:31:50 +0000 (19:31 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@3977 fdb21ef1-2011-0410-befe-b5e4ea1792b1

test/scons-time/run/config/subdir.py
test/scons-time/run/option/subdir.py

index 4d213183881eefa33a2bdaf1e29d9961dc094b7e..b46386803cfb17a03b1bdb0f6fb71f857193c19e 100644 (file)
@@ -58,6 +58,8 @@ expect = [
     'SConstruct file directory: .*%ssubdir$' % re.escape(os.sep),
 ]
 
-test.must_contain_all_lines('foo-000-0.log', content, expect, re.search)
+def re_find(content, line):
+    return re.search(line, content)
+test.must_contain_all_lines(content, expect, 'foo-000-0.log', re_find)
 
 test.pass_test()
index b96d0e661d5b26641b12a39e55665ad6cf66ce13..eeae750b8c559e43f5c399b87795030a5fc988ad 100644 (file)
@@ -54,6 +54,8 @@ expect = [
 
 content = test.read(test.workpath('foo-000-0.log'), mode='r')
 
-test.must_contain_all_lines('foo-000-0.log', content, expect, re.search)
+def re_find(content, line):
+    return re.search(line, content)
+test.must_contain_all_lines(content, expect, 'foo-000-0.log', re_find)
 
 test.pass_test()