From a6ae456de2d2bb88de07c80560424e8fb644dfce Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 25 Oct 2016 07:22:40 +0200 Subject: Diagnose semicolon after testscript setup/teardown commands --- unit-tests/test/script/parser/buildfile | 2 +- unit-tests/test/script/parser/setup-teardown.test | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 unit-tests/test/script/parser/setup-teardown.test (limited to 'unit-tests/test') diff --git a/unit-tests/test/script/parser/buildfile b/unit-tests/test/script/parser/buildfile index a6be1f6..18acd20 100644 --- a/unit-tests/test/script/parser/buildfile +++ b/unit-tests/test/script/parser/buildfile @@ -11,6 +11,6 @@ filesystem config/{utility init operation} dump types-parsers \ test/{target script/{token lexer parser script}} exe{driver}: cxx{driver} ../../../../build2/cxx{$src} $libs \ -test{pre-parse expansion here-document command-re-parse scope} +test{pre-parse expansion here-document command-re-parse scope setup-teardown} include ../../../../build2/ diff --git a/unit-tests/test/script/parser/setup-teardown.test b/unit-tests/test/script/parser/setup-teardown.test new file mode 100644 index 0000000..fa940fd --- /dev/null +++ b/unit-tests/test/script/parser/setup-teardown.test @@ -0,0 +1,7 @@ +$* <"+cmd;" 2>>EOE != 0 # semi-after-setup +testscript:1:5: error: expected newline instead of ';' +EOE + +$* <"-cmd;" 2>>EOE != 0 # semi-after-tdown +testscript:1:5: error: expected newline instead of ';' +EOE -- cgit v1.1