]> git.draconx.ca Git - dxcommon.git/commitdiff
help_print_optstring: Fix NLS test on AIX.
authorNick Bowler <nbowler@draconx.ca>
Tue, 2 Jan 2024 04:24:22 +0000 (23:24 -0500)
committerNick Bowler <nbowler@draconx.ca>
Tue, 2 Jan 2024 04:37:55 +0000 (23:37 -0500)
AIX 7.2 awk does not support "-" as an argument to the -f option
to mean "read from standard input", contrary to POSIX.

Easy enough to work around.

tests/functions.at

index 4a9aeb5b16b9b9dde59b6ba61502dc4f07b54810..01a96a7e2b4b6df9b23f77045a9ea65c73f489c7 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright © 2015, 2021-2023 Nick Bowler
+dnl Copyright © 2015, 2021-2024 Nick Bowler
 dnl
 dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2.
 dnl This is free software: you are free to do what the fuck you want to.
@@ -157,8 +157,7 @@ TEST_UTF8_LOCALE([locale_utf8])
 
 # Avoid some deficient shell parsers barfing on UTF-8 sequences by
 # generating them this way using octal escapes.
-$AWK -f - >expout <<'EOF'
-BEGIN {
+$AWK 'BEGIN {
   zenkaku = "--\345\205\250\350\247\222";
   hankaku = "--\357\276\212\357\276\235\357\275\266\357\275\270"
 
@@ -166,8 +165,7 @@ BEGIN {
 
   print " " zenkaku "\t" "7"
   print " " hankaku "\t" "7"
-}
-EOF
+}' >expout </dev/null
 
 AT_CHECK([LC_ALL=$locale_utf8 xargs "$builddir/t/helpopt3" <args],
   [0], [expout])