xref: /freebsd/contrib/one-true-awk/testdir/T.csconcat (revision 17853db4b0dc36ed32af039cd803f13b692913da)
1*17853db4SWarner Loshecho T.csconcat: test constant string concatenation
223f24377SWarner Losh
323f24377SWarner Loshawk=${awk-../a.out}
423f24377SWarner Losh
523f24377SWarner Losh$awk '
623f24377SWarner LoshBEGIN {
723f24377SWarner Losh	$0 = "aaa"
823f24377SWarner Losh	print "abcdef" " " $0
923f24377SWarner Losh}
1023f24377SWarner LoshBEGIN { print "hello" "world"; print helloworld }
1123f24377SWarner LoshBEGIN {
1223f24377SWarner Losh 	print " " "hello"
1323f24377SWarner Losh 	print "hello" " "
1423f24377SWarner Losh 	print "hello" " " "world"
1523f24377SWarner Losh 	print "hello" (" " "world")
1623f24377SWarner Losh}
1723f24377SWarner Losh' > foo1
1823f24377SWarner Losh
1923f24377SWarner Loshcat << \EOF > foo2
2023f24377SWarner Loshabcdef aaa
2123f24377SWarner Loshhelloworld
2223f24377SWarner Losh
2323f24377SWarner Losh hello
2423f24377SWarner Loshhello
2523f24377SWarner Loshhello world
2623f24377SWarner Loshhello world
2723f24377SWarner LoshEOF
2823f24377SWarner Losh
2923f24377SWarner Loshdiff foo1 foo2 || echo 'BAD: T.csconcat (1)'
30