aboutsummaryrefslogtreecommitdiff
path: root/testdir
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-01-05 21:18:36 +0200
committerArnold D. Robbins <arnold@skeeve.com>2020-01-05 21:18:36 +0200
commitc7eeb57210cc7104df233a243295c36ffe6a2117 (patch)
tree40ad578b849d4a0d18d6669b367ef8f47e939e1b /testdir
parenta1aad88728f6a8bf70c9bf9fd07b062aa6540040 (diff)
downloadone-true-awk-c7eeb57210cc7104df233a243295c36ffe6a2117.tar.gz
Fix merging of concatenated string constants.
Diffstat (limited to 'testdir')
-rwxr-xr-xtestdir/T.concat29
1 files changed, 29 insertions, 0 deletions
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)'