From 6e84c0f9c5e4d7d98d2a352eec6bc19de0d75d28 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 17 Sep 2019 16:00:20 +0300 Subject: Fix crashing on testscript command redirect overrides --- .../test/script/parser+redirect.test.testscript | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) (limited to 'libbuild2/test/script/parser+redirect.test.testscript') diff --git a/libbuild2/test/script/parser+redirect.test.testscript b/libbuild2/test/script/parser+redirect.test.testscript index a8691da..49fa89b 100644 --- a/libbuild2/test/script/parser+redirect.test.testscript +++ b/libbuild2/test/script/parser+redirect.test.testscript @@ -167,6 +167,92 @@ } } } + + : overriding + : + { + : literal + : + { + : with + : + { + : string + : + $* <>EOO + cmd >>EOF >bar + foo + EOF + EOI + cmd >bar + EOO + + : regex + : + $* <>EOO + cmd >>FOO >>~/BAR/ + foo + FOO + bar + BAR + EOI + cmd >>~/BAR/ + bar + BAR + EOO + + : self + : + $* <>EOO + cmd >>EOF >>EOF + foo + EOF + EOI + cmd >>EOF + foo + EOF + EOO + + : different-modifiers + : + $* <>EOE != 0 + cmd >>EOF >>/EOF + foo + EOF + EOI + testscript:1:14: error: different modifiers for shared here-document 'EOF' + EOE + } + } + + : shared + : + { + : after-sharing + : + $* <>EOO + cmd >>EOF 2>>EOF >bar + foo + EOF + EOI + cmd >bar 2>>EOF + foo + EOF + EOO + + : before-sharing + : + $* <>EOO + cmd >>EOF >bar 2>>EOF + foo + EOF + EOI + cmd >bar 2>>EOF + foo + EOF + EOO + } + } } : file -- cgit v1.1