From b808c255b6a9ddba085bf5646e7d20ec344f2e2d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 28 Apr 2020 08:48:53 +0200 Subject: Initial support for ad hoc recipes (still work in progress) --- .../build/script/parser+cleanup.test.testscript | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 libbuild2/build/script/parser+cleanup.test.testscript (limited to 'libbuild2/build/script/parser+cleanup.test.testscript') diff --git a/libbuild2/build/script/parser+cleanup.test.testscript b/libbuild2/build/script/parser+cleanup.test.testscript new file mode 100644 index 0000000..9a5af3d --- /dev/null +++ b/libbuild2/build/script/parser+cleanup.test.testscript @@ -0,0 +1,57 @@ +# file : libbuild2/build/script/parser+cleanup.test.testscript +# license : MIT; see accompanying LICENSE file + +: always +: +$* <>EOO +cmd &file +EOI +cmd &file +EOO + +: maybe +: +$* <>EOO +cmd &?file +EOI +cmd &?file +EOO + +: never +: +$* <>EOO +cmd &!file +EOI +cmd &!file +EOO + +: empty +: +$* <>EOE != 0 +cmd &"" +EOI +buildfile:11:6: error: empty cleanup path +EOE + +: missed-before +: +{ + : token + : + : Path missed before command next token + : + $* <>EOE != 0 + cmd & >file + EOI + buildfile:11:7: error: missing cleanup path + EOE + + : end + : Test path missed before end of command + : + $* <>EOE != 0 + cmd & + EOI + buildfile:11:6: error: missing cleanup path + EOE +} -- cgit v1.1