test-pwrite.c: Remove unused variable declaration.
[gnulib.git] / tests / test-verify.sh
1 #!/bin/sh
2 . "${srcdir=.}/init.sh"
3
4 # Rather than figure out how to invoke the compiler with the right
5 # include path ourselves, we let make do it:
6 (cd "$initial_cwd_" && rm -f test-verify.o \
7     && $MAKE test-verify.o >/dev/null 2>&1) \
8   || skip_ "cannot compile error-free"
9
10 # Now, prove that we encounter all expected compilation failures:
11 : >out
12 : >err
13 for i in 1 2 3 4 5; do
14   (cd "$initial_cwd_"
15    rm -f test-verify.o
16    $MAKE CFLAGS=-DEXP_FAIL=$i test-verify.o) >>out 2>>err \
17   && { warn_ "compiler didn't detect verification failure $i"; fail=1; }
18 done
19
20 Exit $fail