From c7eeb57210cc7104df233a243295c36ffe6a2117 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 5 Jan 2020 21:18:36 +0200 Subject: Fix merging of concatenated string constants. --- testdir/T.concat | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 testdir/T.concat (limited to 'testdir') diff --git a/testdir/T.concat b/testdir/T.concat new file mode 100755 index 0000000..c6bd016 --- /dev/null +++ b/testdir/T.concat @@ -0,0 +1,29 @@ +echo T.concat: test constant string concatentation + +awk=${awk-../a.out} + +$awk ' +BEGIN { + $0 = "aaa" + print "abcdef" " " $0 +} +BEGIN { print "hello" "world"; print helloworld } +BEGIN { + print " " "hello" + print "hello" " " + print "hello" " " "world" + print "hello" (" " "world") +} +' > foo1 + +cat << \EOF > foo2 +abcdef aaa +helloworld + + hello +hello +hello world +hello world +EOF + +diff foo1 foo2 || echo 'BAD: T.concat (1)' -- cgit v1.2.3