summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Node/FSTests.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Node/FSTests.py')
-rw-r--r--src/engine/SCons/Node/FSTests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py
index 399ac06a..273f8097 100644
--- a/src/engine/SCons/Node/FSTests.py
+++ b/src/engine/SCons/Node/FSTests.py
@@ -1315,6 +1315,14 @@ class FSTestCase(_tempdirTestCase):
assert eval('f1.get_text_contents() == u"Foo\x1aBar"'), \
f1.get_text_contents()
+ # Check for string which doesn't have BOM and isn't valid
+ # ASCII
+ test_string = b'Gan\xdfauge'
+ test.write('latin1_file', test_string)
+ f1 = fs.File(test.workpath("latin1_file"))
+ assert f1.get_text_contents() == test_string.decode('latin-1'), \
+ f1.get_text_contents()
+
def nonexistent(method, s):
try:
x = method(s, create = 0)