From 8d269ef85984f6476e7fdbec2c5a70f3b5c48a72 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 12 Jul 2021 11:27:11 +0200 Subject: awk: fix printf "%-10c", 0 function old new delta awk_printf 596 626 +30 Signed-off-by: Denys Vlasenko --- testsuite/awk.tests | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'testsuite') diff --git a/testsuite/awk.tests b/testsuite/awk.tests index 242c897d1..3cddb4dd4 100755 --- a/testsuite/awk.tests +++ b/testsuite/awk.tests @@ -415,6 +415,14 @@ testing "awk printf('%c') can output NUL" \ "awk '{printf(\"hello%c null\n\", 0)}'" "hello\0 null\n" "" "\n" SKIP= +optional FEATURE_AWK_GNU_EXTENSIONS +testing "awk printf('%-10c') can output NUL" \ + "awk 'BEGIN { printf \"[%-10c]\n\", 0 }' | od -tx1" "\ +0000000 5b 00 20 20 20 20 20 20 20 20 20 5d 0a +0000015 +" "" "" +SKIP= + # testing "description" "command" "result" "infile" "stdin" testing 'awk negative field access' \ 'awk 2>&1 -- '\''{ $(-1) }'\' \ -- cgit v1.2.3