mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 05:10:17 +01:00
The test has a newline before the left parenthesis, and newlines to separate the parentheses from the argument. The fix involves more state in the lexer to only return a NEWLINE token when termniating a directive. This is very similar to our previous fix with extra lexer state to only return the SPACE token when it would be significant for the parser. With this change, the exact number and positioning of newlines in the output is now different compared to "gcc -E" so we add a -B option to diff when testing to ignore that.
9 lines
213 B
Bash
Executable file
9 lines
213 B
Bash
Executable file
#!/bin/sh
|
|
|
|
for test in *.c; do
|
|
echo "Testing $test"
|
|
../glcpp < $test > $test.out
|
|
gcc -E $test -o $test.gcc
|
|
grep -v '^#' < $test.gcc > $test.expected
|
|
diff -B -w -u $test.expected $test.out
|
|
done
|