]> git.draconx.ca Git - cdecl99.git/commitdiff
tests: Try not to split fields in randomdecl sanity test.
authorNick Bowler <nbowler@draconx.ca>
Wed, 6 Dec 2023 06:17:56 +0000 (01:17 -0500)
committerNick Bowler <nbowler@draconx.ca>
Wed, 6 Dec 2023 06:17:56 +0000 (01:17 -0500)
HP-UX 11 awk will simply exit with an error if any input line has more
than 199 fields.  To avoid this happening in the randomdecl sanity test,
set FS to some garbage because we don't actually use any of the field
variables in this script.

tests/stress.at

index 002b966ba5acf9b6cda2d5c1793134c63b7bb181..1426062a679935d36569e5be7b77fe0c939a8164 100644 (file)
@@ -64,7 +64,10 @@ m4_define([sanity_tests], [dnl
 
 m4_define([sanity_awk], [[/$1/ { found["$2"] = 1; }
 ]])AT_DATA([sanity.awk],
-[m4_map([sanity_awk], [sanity_tests])dnl
+[# We don't need any field splitting, so choose a character that does not
+# appear in C code to avoid tripping over 199-field limit in HP-UX 11 awk.
+BEGIN { FS = "@"; }
+m4_map([sanity_awk], [sanity_tests])dnl
 END { for (k in found) print "FOUND", k; }
 ])