diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-03-14 03:24:15 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-03-14 03:24:15 (GMT) |
commit | 2da21594f9468283525c27992eb8565d3473841b (patch) | |
tree | 96f6919e6a664a4268777ca6d9b1ebdcf34396da | |
parent | 496d5d4655ec5eaaf5f47b70a0a5e9f08a310ff3 (diff) | |
download | SCons-2da21594f9468283525c27992eb8565d3473841b.zip SCons-2da21594f9468283525c27992eb8565d3473841b.tar.gz SCons-2da21594f9468283525c27992eb8565d3473841b.tar.bz2 |
py2/3 add mode=r to must_match to fix win32 py27,py3
-rw-r--r-- | test/CXX/CXX.py | 4 | ||||
-rw-r--r-- | test/Install/Install.py | 24 | ||||
-rw-r--r-- | test/Scanner/FindPathDirs.py | 6 | ||||
-rw-r--r-- | test/Scanner/Scanner.py | 32 | ||||
-rw-r--r-- | test/Scanner/generated.py | 2 | ||||
-rw-r--r-- | test/Scanner/no-Dir-node.py | 4 | ||||
-rw-r--r-- | test/VariantDir/Clean.py | 4 | ||||
-rw-r--r-- | test/VariantDir/File-create.py | 4 |
8 files changed, 40 insertions, 40 deletions
diff --git a/test/CXX/CXX.py b/test/CXX/CXX.py index 83c4285..abccf1e 100644 --- a/test/CXX/CXX.py +++ b/test/CXX/CXX.py @@ -178,7 +178,7 @@ env.Program(target = 'test6', source = 'test6.C') test.run(arguments = '.', stderr = None) - test.must_match('test6' + _exe, "This is a .C file.\n") + test.must_match('test6' + _exe, "This is a .C file.\n", mode='r') @@ -224,7 +224,7 @@ test.must_not_exist(test.workpath('wrapper.out')) test.run(arguments = 'bar' + _exe) -test.must_match('wrapper.out', "wrapper.py\n") +test.must_match('wrapper.out', "wrapper.py\n", mode='r') test.pass_test() diff --git a/test/Install/Install.py b/test/Install/Install.py index d039d78..72a7545 100644 --- a/test/Install/Install.py +++ b/test/Install/Install.py @@ -96,17 +96,17 @@ test.write(f6_txt, "f6.txt\n") test.run(chdir = 'work', arguments = '.') -test.must_match(f1_out, "f1.in\n") -test.must_match(f2_out, "f2.in\n") -test.must_match(f3_out, "f3.in\n") -test.must_match(f4_out, "sub/f4.in\n") -test.must_match(['work', 'f5.txt'], "f5.txt\n") -test.must_match(['work', 'export', 'f5.txt'], "f5.txt\n") -test.must_match(['work', 'f6.txt'], "f6.txt\n") -test.must_match(['work', 'export', 'f6.txt'], "f6.txt\n") - -test.must_match(['work', 'my_install.out'], os.path.join('export', 'f3.out')) -test.must_match(['work', 'export', 'f1.in'], "f1.in\n") +test.must_match(f1_out, "f1.in\n", mode='r') +test.must_match(f2_out, "f2.in\n", mode='r') +test.must_match(f3_out, "f3.in\n", mode='r') +test.must_match(f4_out, "sub/f4.in\n", mode='r') +test.must_match(['work', 'f5.txt'], "f5.txt\n", mode='r') +test.must_match(['work', 'export', 'f5.txt'], "f5.txt\n", mode='r') +test.must_match(['work', 'f6.txt'], "f6.txt\n", mode='r') +test.must_match(['work', 'export', 'f6.txt'], "f6.txt\n", mode='r') + +test.must_match(['work', 'my_install.out'], os.path.join('export', 'f3.out'), mode='r') +test.must_match(['work', 'export', 'f1.in'], "f1.in\n", mode='r') # make sure the programs didn't get rebuilt, because nothing changed: oldtime1 = os.path.getmtime(f1_out) @@ -123,7 +123,7 @@ test.fail_test(oldtime2 != os.path.getmtime(f2_out)) # Verify that we didn't link to the Installed file. open(f2_out, 'w').write("xyzzy\n") -test.must_match(['work', 'f2.out'], "f2.in\n") +test.must_match(['work', 'f2.out'], "f2.in\n", mode='r') # Verify that scons prints an error message # if a target can not be unlinked before building it: diff --git a/test/Scanner/FindPathDirs.py b/test/Scanner/FindPathDirs.py index 7f8b993..c56f448 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 625b372..d5e5c3a 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 9dd2a86..4a368b4 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 123764e..69b665a 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() diff --git a/test/VariantDir/Clean.py b/test/VariantDir/Clean.py index b2e93a3..1287034 100644 --- a/test/VariantDir/Clean.py +++ b/test/VariantDir/Clean.py @@ -57,10 +57,10 @@ test.write('sample.in', "sample.in\n") test.run(arguments = '.') -test.must_match(['build0', 'sample.out'], "sample.in\n") +test.must_match(['build0', 'sample.out'], "sample.in\n", mode='r') test.must_exist(['build0', 'sample.junk']) -test.must_match(['build1', 'sample.out'], "sample.in\n") +test.must_match(['build1', 'sample.out'], "sample.in\n", mode='r') test.must_exist(['build1', 'sample.junk']) test.run(arguments = '-c .') diff --git a/test/VariantDir/File-create.py b/test/VariantDir/File-create.py index 50db618..25e6c09 100644 --- a/test/VariantDir/File-create.py +++ b/test/VariantDir/File-create.py @@ -60,10 +60,10 @@ open('f2.in', 'w').write("f2.in\\n") test.run(arguments = '--tree=all .') #test.must_match(['build0', 'f1.out'], "f1.in\n") -test.must_match(['build0', 'f2.out'], "f2.in\n") +test.must_match(['build0', 'f2.out'], "f2.in\n", mode='r') #test.must_match(['build1', 'f1.out'], "f1.in\n") -test.must_match(['build1', 'f2.out'], "f2.in\n") +test.must_match(['build1', 'f2.out'], "f2.in\n", mode='r') test.up_to_date(arguments = '.') |