summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-05-31 10:13:55 -0700
committerDylan Baker <dylan@pnwbakers.com>2019-09-10 20:36:46 +0000
commit26961e2cb5e20a1d56915d903f8f03391b4fd109 (patch)
tree46b7cbbfc8f92c614eb273ef094aa129e6a2d50c /src
parent077a1952cceb9b577437c9e31be094427d5c7a9a (diff)
downloadmesa-26961e2cb5e20a1d56915d903f8f03391b4fd109.tar.gz
mesa-26961e2cb5e20a1d56915d903f8f03391b4fd109.tar.bz2
mesa-26961e2cb5e20a1d56915d903f8f03391b4fd109.zip
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@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/tests/sexps.py2
1 files changed, 1 insertions, 1 deletions
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)