aboutsummaryrefslogtreecommitdiffstats
path: root/testawk
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-03-23 07:52:50 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-03-23 07:52:50 -0700
commite0a110da6ff3595d2557d86c6df0f15f6ed45593 (patch)
tree665d7d485d7f5c2ac6101ff3415396af67883b4e /testawk
parent4e2856ddbea81e48bee950767fa4ac1a5ff6c453 (diff)
downloadcppawk-e0a110da6ff3595d2557d86c6df0f15f6ed45593.tar.gz
cppawk-e0a110da6ff3595d2557d86c6df0f15f6ed45593.tar.bz2
cppawk-e0a110da6ff3595d2557d86c6df0f15f6ed45593.zip
hygiene: shell escape $awk and $prepro.
Since $awk and $prepro are now controlled via command line options, and are being fed to eval, we should shell escape them. Two of our test cases rely on the loose interpolation behavior; we fix those using proper external mock programs testawk and testcpp.
Diffstat (limited to 'testawk')
-rwxr-xr-xtestawk3
1 files changed, 3 insertions, 0 deletions
diff --git a/testawk b/testawk
new file mode 100755
index 0000000..a41b4b6
--- /dev/null
+++ b/testawk
@@ -0,0 +1,3 @@
+#!/bin/sh
+printf "[%.2s]" "$@"
+printf "\n"