From 57b10c06925d0bdf6ffb38488ee908f085109e95 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 4 Jul 2019 19:12:15 +0300 Subject: Move config, dist, test, and install modules into library --- .../script/parser+here-document.test.testscript | 213 +++++++++++++++++++++ 1 file changed, 213 insertions(+) create mode 100644 libbuild2/test/script/parser+here-document.test.testscript (limited to 'libbuild2/test/script/parser+here-document.test.testscript') diff --git a/libbuild2/test/script/parser+here-document.test.testscript b/libbuild2/test/script/parser+here-document.test.testscript new file mode 100644 index 0000000..00f3fbd --- /dev/null +++ b/libbuild2/test/script/parser+here-document.test.testscript @@ -0,0 +1,213 @@ +# file : libbuild2/test/script/parser+here-document.test.testscript +# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +: end-marker +: +{ + : missing-newline + : + $* <'cmd <<' 2>>EOE != 0 + testscript:1:7: error: expected here-document end marker + EOE + + : missing-exit + : + $* <'cmd << != 0' 2>>EOE != 0 + testscript:1:8: error: expected here-document end marker + EOE + + : missing-empty + : + $* <'cmd <<""' 2>>EOE != 0 + testscript:1:7: error: expected here-document end marker + EOE + + : unseparated-expansion + : + $* <'cmd <>EOE != 0 + testscript:1:10: error: here-document end marker must be literal + EOE + + : quoted-single-partial + : + $* <"cmd <>EOE != 0 + testscript:1:7: error: partially-quoted here-document end marker + EOE + + : quoted-double-partial + : + $* <'cmd <<"FO"O' 2>>EOE != 0 + testscript:1:7: error: partially-quoted here-document end marker + EOE + + : quoted-mixed + : + $* <"cmd <<\"FO\"'O'" 2>>EOE != 0 + testscript:1:7: error: partially-quoted here-document end marker + EOE + + : unseparated + : + $* <>EOO + cmd <>EOO + cmd <<'EOF' + foo + EOF + EOI + cmd <>EOO + cmd <<"EOF" + foo + EOF + EOI + cmd <>EOO + cmd <>EOO + cmd <>EOO + cmd <>EOO + x = foo bar + cmd <<"EOF" + $x + EOF + EOI + cmd <>EOO + x = foo + cmd <<"EOF" + $x bar $x + EOF + EOI + cmd <>EOE != 0 + cmd <>EOO +cmd <>EOO +cmd <<"EOF" +'single' +"double" +b'o't"h" +('single' "double") +EOF +EOI +cmd <