summaryrefslogtreecommitdiff
path: root/tests/glcpp-test
blob: 92c994979a98a5d6782ecfcbf65eb8d62372c5c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
set -e

for test in *.c; do
    echo "Testing $test"
    ../glcpp < $test > $test.glcpp
    grep -v '^$' < $test.glcpp > $test.out || true
    gcc -E $test -o $test.gcc
    grep -v '^#' < $test.gcc | grep -v '^$' > $test.expected || true
    diff -u $test.expected $test.out
done