diff options
Diffstat (limited to 'src/compiler')
-rwxr-xr-x | src/compiler/glsl/glcpp/tests/glcpp_test.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/glsl/glcpp/tests/glcpp_test.py b/src/compiler/glsl/glcpp/tests/glcpp_test.py index e27391093cf..1481eed6188 100755 --- a/src/compiler/glsl/glcpp/tests/glcpp_test.py +++ b/src/compiler/glsl/glcpp/tests/glcpp_test.py @@ -46,7 +46,10 @@ def arg_parser(): def parse_test_file(filename, nl_format): """Check for any special arguments and return them as a list.""" - with open(filename) as f: + # Disable "universal newlines" mode; we can't directly use `nl_format` as + # the `newline` argument, because the "bizarro" test uses something Python + # considers invalid. + with io.open(filename, newline='') as f: for l in f.read().split(nl_format): if 'glcpp-args:' in l: return l.split('glcpp-args:')[1].strip().split() |