Mesa (master): glsl/tests: Handle windows \r\n new lines
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Sep 10 20:56:53 UTC 2019
Module: Mesa
Branch: master
Commit: 26961e2cb5e20a1d56915d903f8f03391b4fd109
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=26961e2cb5e20a1d56915d903f8f03391b4fd109
Author: Dylan Baker <dylan at pnwbakers.com>
Date: Fri May 31 10:13:55 2019 -0700
glsl/tests: Handle windows \r\n new lines
Currently the praser for s expressions assumes that newlines will be \n,
resulting in incorrect parsing on windows, where the newline is \r\n.
This patch just adds \r? to the regular expression used to parse the s
expressions, which fixes at 1 test on windows.
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
---
src/compiler/glsl/tests/sexps.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/glsl/tests/sexps.py b/src/compiler/glsl/tests/sexps.py
index 7939b42f9a2..7de5db39be6 100644
--- a/src/compiler/glsl/tests/sexps.py
+++ b/src/compiler/glsl/tests/sexps.py
@@ -52,7 +52,7 @@ def parse_sexp(sexp):
into a sexp represented as nested lists containing strings.
"""
sexp_token_regexp = re.compile(
- '[a-zA-Z_]+(@[0-9]+)?|[0-9]+(\\.[0-9]+)?|[^ \n]')
+ '[a-zA-Z_]+(@[0-9]+)?|[0-9]+(\\.[0-9]+)?|[^ \r?\n]')
stack = [[]]
for match in sexp_token_regexp.finditer(sexp):
token = match.group(0)
More information about the mesa-commit
mailing list