summaryrefslogtreecommitdiff
path: root/test/Scanner
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-03-14 18:55:22 -0400
committerWilliam Deegan <bill@baddogconsulting.com>2017-03-14 18:55:22 -0400
commit2b33b03f313d7719508c84966b1a783092e0a6d3 (patch)
tree847ff2cad174b1afc2c00715f6ed75a1ce2c8ac7 /test/Scanner
parentd1a4adb226227255b8f91374639bdea3a7645d3c (diff)
downloadscons-2b33b03f313d7719508c84966b1a783092e0a6d3.tar.gz
scanner.py works for win32 py27, but fails py3
Diffstat (limited to 'test/Scanner')
-rw-r--r--test/Scanner/Scanner.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/Scanner/Scanner.py b/test/Scanner/Scanner.py
index d5e5c3ac..45eddb91 100644
--- a/test/Scanner/Scanner.py
+++ b/test/Scanner/Scanner.py
@@ -25,6 +25,7 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
+import os
_python_ = TestSCons._python_
@@ -183,7 +184,14 @@ test.run(arguments = '.', stdout=expect)
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')
+
+import sys
+thingy = "xxx 1\nmoo.lork 1 line 2\nyyy 1\nmoo.lork 1 line 4\ninclude zzz\n".replace('\n','\r\n')
+thingy2 = "xxx 1\nmoo.lork 1 line 2\nyyy 1\nmoo.lork 1 line 4\ninclude zzz\n".replace('\n',os.linesep)
+if thingy != thingy2:
+ sys.stderr.write("FARGINBAKJKJDLFKJSLDKFJ")
+test.must_match('moo.ork', "xxx 1\nmoo.lork 1 line 2\nyyy 1\nmoo.lork 1 line 4\ninclude zzz\n".replace('\n','\r\n'),
+ mode='r')
test.up_to_date(arguments = '.')
@@ -200,7 +208,7 @@ test.run(arguments = '.', stdout=expect)
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.must_match('moo.ork', "xxx 2\nmoo.lork 1 line 2\nyyy 1\nmoo.lork 1 line 4\ninclude zzz\n".replace('\n',os.linesep), mode='r')
test.write('yyy', "yyy 2\n")
@@ -217,7 +225,7 @@ test.run(arguments = '.', stdout=expect)
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.must_match('moo.ork', "xxx 2\nmoo.lork 1 line 2\nyyy 2\nmoo.lork 1 line 4\ninclude zzz\n".replace('\n',os.linesep), mode='r')
test.write('zzz', "zzz 2\n")
@@ -231,7 +239,7 @@ test.run(arguments = '.', stdout=expect)
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.must_match('moo.ork', "xxx 2\nmoo.lork 1 line 2\nyyy 2\nmoo.lork 1 line 4\ninclude zzz\n".replace('\n',os.linesep), mode='r')
test.up_to_date(arguments = 'foo')