X-Git-Url: http://git.draconx.ca/gitweb/dxcommon.git/blobdiff_plain/15c81590df7ef0ff8ec387b259fee8dac8ceda0e..846482f49d7cf15b749c5b67ab8268f4d82297a4:/tests/scripts.at diff --git a/tests/scripts.at b/tests/scripts.at index 880bb6c..dbec2c9 100644 --- a/tests/scripts.at +++ b/tests/scripts.at @@ -331,21 +331,18 @@ AT_CHECK([$AWK -f "$srcdir/scripts/gen-strtab.awk" test.h]) sed -n 's/^[[&]]\([[^ ]]*\).*/\1/p' test.def >identifiers # test 0: sanity test -AT_DATA([test0.c], -[[#include "test.h" +{ cat <<'EOF' +#include "test.h" #include int main(void) { printf("---\n"); -]]) -exec 3>test0.c -while read ident <&3; do - AS_ECHO([' printf("%s\n---\n", '"strtab+$ident);"]) >&4 -done -AS_ECHO([' return 0;']) >&4 -AS_ECHO(['}']) >&4 -exec 3<&- 4>&- +EOF +while read id; do AS_ECHO([' printf("%s\n---\n", strtab+'"$id"');']); done +AS_ECHO([' return 0;']) +AS_ECHO(['}']) +} test0.c AT_CHECK([$CC -o test0$EXEEXT test0.c && ./test0$EXEEXT], [0], [--- world