mesa/tests/glcpp-test
Carl Worth b20d33c5c6 Implement #if, #else, #elif, and #endif with tests.
So far the only expression implemented is a single integer literal,
but obviously that's easy to extend. Various things including nesting
are tested here.
2010-05-20 22:27:07 -07:00

9 lines
210 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 -u $test.expected $test.out
done