summaryrefslogtreecommitdiff
path: root/test/Scanner
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-13 23:24:15 -0400
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-13 23:24:15 -0400
commitbfcb8661d8fa5b210c2b216f48f9b9f35b4e1d7f (patch)
tree96f6919e6a664a4268777ca6d9b1ebdcf34396da /test/Scanner
parentdc086e8b9faff16883edfe4b3a8f6bb5e685a2a3 (diff)
downloadscons-bfcb8661d8fa5b210c2b216f48f9b9f35b4e1d7f.tar.gz
py2/3 add mode=r to must_match to fix win32 py27,py3
Diffstat (limited to 'test/Scanner')
-rw-r--r--test/Scanner/FindPathDirs.py6
-rw-r--r--test/Scanner/Scanner.py32
-rw-r--r--test/Scanner/generated.py2
-rw-r--r--test/Scanner/no-Dir-node.py4
4 files changed, 22 insertions, 22 deletions
diff --git a/test/Scanner/FindPathDirs.py b/test/Scanner/FindPathDirs.py
index 7f8b993e..c56f448f 100644
--- a/test/Scanner/FindPathDirs.py
+++ b/test/Scanner/FindPathDirs.py
@@ -124,7 +124,7 @@ test.write(['inc2', 'yyy'], "inc2/yyy 1\n")
test.run()
-test.must_match('foo', "foo.k 1 line 1\ninc1/xxx 1\ninc2/yyy 1\nfoo.k 1 line 4\n")
+test.must_match('foo', "foo.k 1 line 1\ninc1/xxx 1\ninc2/yyy 1\nfoo.k 1 line 4\n", mode='r')
test.up_to_date(arguments = '.')
@@ -134,7 +134,7 @@ test.write(['inc1', 'xxx'], "inc1/xxx 2\n")
test.run()
-test.must_match('foo', "foo.k 1 line 1\ninc1/xxx 2\ninc2/yyy 1\nfoo.k 1 line 4\n")
+test.must_match('foo', "foo.k 1 line 1\ninc1/xxx 2\ninc2/yyy 1\nfoo.k 1 line 4\n", mode='r')
@@ -142,7 +142,7 @@ test.write(['inc1', 'yyy'], "inc1/yyy 2\n")
test.run()
-test.must_match('foo', "foo.k 1 line 1\ninc1/xxx 2\ninc1/yyy 2\nfoo.k 1 line 4\n")
+test.must_match('foo', "foo.k 1 line 1\ninc1/xxx 2\ninc1/yyy 2\nfoo.k 1 line 4\n", mode='r')
diff --git a/test/Scanner/Scanner.py b/test/Scanner/Scanner.py
index 625b3729..d5e5c3ac 100644
--- a/test/Scanner/Scanner.py
+++ b/test/Scanner/Scanner.py
@@ -180,10 +180,10 @@ blork(["moo.ork"], ["moo.blork"])
test.run(arguments = '.', stdout=expect)
-test.must_match('foo', "foo.k 1 line 1\nxxx 1\nyyy 1\nfoo.k 1 line 4\n")
-test.must_match('bar', "yyy 1\nbar.in 1 line 2\nbar.in 1 line 3\nzzz 1\n")
-test.must_match('junk', "yyy 1\njunk.k2 1 line 2\njunk.k2 1 line 3\nzzz 1\n")
-test.must_match('moo.ork', "xxx 1\nmoo.lork 1 line 2\nyyy 1\nmoo.lork 1 line 4\ninclude zzz\n")
+test.must_match('foo', "foo.k 1 line 1\nxxx 1\nyyy 1\nfoo.k 1 line 4\n", mode='r')
+test.must_match('bar', "yyy 1\nbar.in 1 line 2\nbar.in 1 line 3\nzzz 1\n", mode='r')
+test.must_match('junk', "yyy 1\njunk.k2 1 line 2\njunk.k2 1 line 3\nzzz 1\n", mode='r')
+test.must_match('moo.ork', "xxx 1\nmoo.lork 1 line 2\nyyy 1\nmoo.lork 1 line 4\ninclude zzz\n", mode='r')
test.up_to_date(arguments = '.')
@@ -197,10 +197,10 @@ blork(["moo.ork"], ["moo.blork"])
test.run(arguments = '.', stdout=expect)
-test.must_match('foo', "foo.k 1 line 1\nxxx 2\nyyy 1\nfoo.k 1 line 4\n")
-test.must_match('bar', "yyy 1\nbar.in 1 line 2\nbar.in 1 line 3\nzzz 1\n")
-test.must_match('junk', "yyy 1\njunk.k2 1 line 2\njunk.k2 1 line 3\nzzz 1\n")
-test.must_match('moo.ork', "xxx 2\nmoo.lork 1 line 2\nyyy 1\nmoo.lork 1 line 4\ninclude zzz\n")
+test.must_match('foo', "foo.k 1 line 1\nxxx 2\nyyy 1\nfoo.k 1 line 4\n", mode='r')
+test.must_match('bar', "yyy 1\nbar.in 1 line 2\nbar.in 1 line 3\nzzz 1\n", mode='r')
+test.must_match('junk', "yyy 1\njunk.k2 1 line 2\njunk.k2 1 line 3\nzzz 1\n", mode='r')
+test.must_match('moo.ork', "xxx 2\nmoo.lork 1 line 2\nyyy 1\nmoo.lork 1 line 4\ninclude zzz\n", mode='r')
test.write('yyy', "yyy 2\n")
@@ -214,10 +214,10 @@ blork(["moo.ork"], ["moo.blork"])
test.run(arguments = '.', stdout=expect)
-test.must_match('foo', "foo.k 1 line 1\nxxx 2\nyyy 2\nfoo.k 1 line 4\n")
-test.must_match('bar', "yyy 2\nbar.in 1 line 2\nbar.in 1 line 3\nzzz 1\n")
-test.must_match('junk', "yyy 2\njunk.k2 1 line 2\njunk.k2 1 line 3\nzzz 1\n")
-test.must_match('moo.ork', "xxx 2\nmoo.lork 1 line 2\nyyy 2\nmoo.lork 1 line 4\ninclude zzz\n")
+test.must_match('foo', "foo.k 1 line 1\nxxx 2\nyyy 2\nfoo.k 1 line 4\n", mode='r')
+test.must_match('bar', "yyy 2\nbar.in 1 line 2\nbar.in 1 line 3\nzzz 1\n", mode='r')
+test.must_match('junk', "yyy 2\njunk.k2 1 line 2\njunk.k2 1 line 3\nzzz 1\n", mode='r')
+test.must_match('moo.ork', "xxx 2\nmoo.lork 1 line 2\nyyy 2\nmoo.lork 1 line 4\ninclude zzz\n", mode='r')
test.write('zzz', "zzz 2\n")
@@ -228,10 +228,10 @@ expect = test.wrap_stdout("""\
test.run(arguments = '.', stdout=expect)
-test.must_match('foo', "foo.k 1 line 1\nxxx 2\nyyy 2\nfoo.k 1 line 4\n")
-test.must_match('bar', "yyy 2\nbar.in 1 line 2\nbar.in 1 line 3\nzzz 2\n")
-test.must_match('junk', "yyy 2\njunk.k2 1 line 2\njunk.k2 1 line 3\nzzz 2\n")
-test.must_match('moo.ork', "xxx 2\nmoo.lork 1 line 2\nyyy 2\nmoo.lork 1 line 4\ninclude zzz\n")
+test.must_match('foo', "foo.k 1 line 1\nxxx 2\nyyy 2\nfoo.k 1 line 4\n", mode='r')
+test.must_match('bar', "yyy 2\nbar.in 1 line 2\nbar.in 1 line 3\nzzz 2\n", mode='r')
+test.must_match('junk', "yyy 2\njunk.k2 1 line 2\njunk.k2 1 line 3\nzzz 2\n", mode='r')
+test.must_match('moo.ork', "xxx 2\nmoo.lork 1 line 2\nyyy 2\nmoo.lork 1 line 4\ninclude zzz\n", mode='r')
test.up_to_date(arguments = 'foo')
diff --git a/test/Scanner/generated.py b/test/Scanner/generated.py
index 9dd2a86b..4a368b4c 100644
--- a/test/Scanner/generated.py
+++ b/test/Scanner/generated.py
@@ -431,7 +431,7 @@ libg_gx.h: 2
libg_gy.h: 1
libg_gz.h: 1
libg_w.h: 2
-""")
+""", mode='r')
test.pass_test()
diff --git a/test/Scanner/no-Dir-node.py b/test/Scanner/no-Dir-node.py
index 123764e8..69b665a9 100644
--- a/test/Scanner/no-Dir-node.py
+++ b/test/Scanner/no-Dir-node.py
@@ -122,13 +122,13 @@ test.must_match('subdir/foo', """\
subdir/foo.k
inc1/include.h
inc2/include.h
-""")
+""", mode='r')
test.must_match('list.out', """\
%(subdir_SConscript)s
%(subdir_foo)s
%(subdir_foo_k)s
-""" % locals())
+""" % locals(), mode='r')
test.pass_test()