]> git.draconx.ca Git - gob-dx.git/blobdiff - tests/general.at
Fix awk usage in the testsuite.
[gob-dx.git] / tests / general.at
index 624af5a9a8199e09e0a98a32bae22c55dfacde47..e35c578a8032d81193de819bd82ce7efc9ad1b3b 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright © 2019-2021 Nick Bowler
+dnl Copyright © 2019-2022 Nick Bowler
 dnl License GPLv2+: GNU General Public License version 2 or any later version.
 dnl This is free software: you are free to change and redistribute it.
 dnl There is NO WARRANTY, to the extent permitted by law.
@@ -51,19 +51,19 @@ TEST_COMPILE_GOBJECT([str.c], [0], [], [stderr])
 mv stderr str_stderr
 
 # Check for correct diagnostic messages on the target lines...
-AT_CHECK([awk '/want a string/ { print NR }' "$str_gob" >str_lines])
+AT_CHECK([$AWK '/want a string/ { print NR }' "$str_gob" >str_lines])
 total=0
 exec 3<str_lines
 while read l <&3; do
   AS_VAR_ARITH([total], [1 + $total])
-  AT_CHECK([awk -v line="$l" -v file="$str_gob" -NF : \
+  AT_CHECK([$AWK -v line="$l" -v file="$str_gob" -F : \
     '$1 == file && $2 == line { exit 42 }' str_stderr], [42])
 done
 exec 3<&-
 AT_CHECK([test x"$total" = x"2"])
 
 TEST_COMPILE_GOBJECT([main.c], [0], [], [stderr])
-AT_CHECK([awk -NF : '$1 == "main.c" && $2 == "16" { exit 42 }' stderr], [42])
+AT_CHECK([$AWK -F : '$1 == "main.c" && $2 == "16" { exit 42 }' stderr], [42])
 
 AT_CHECK([$CC $CFLAGS $LDFLAGS $LIBGOBJECT_LIBS -o main str.o main.o])