diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-01-06 18:46:58 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-01-09 21:44:23 +0300 |
commit | c55240fb05151cae046c75a793c164d72c988db2 (patch) | |
tree | 35cbba195e0fcc581944b7b098a3ea145741cf94 /unit-tests/test/script/parser/setup-teardown.test | |
parent | 9e2b4fd3bbc0c61bf6c84540c52869ec7d830718 (diff) |
Tests cleanup (take 2)
Diffstat (limited to 'unit-tests/test/script/parser/setup-teardown.test')
-rw-r--r-- | unit-tests/test/script/parser/setup-teardown.test | 126 |
1 files changed, 83 insertions, 43 deletions
diff --git a/unit-tests/test/script/parser/setup-teardown.test b/unit-tests/test/script/parser/setup-teardown.test index 5d30ed4..c9183ef 100644 --- a/unit-tests/test/script/parser/setup-teardown.test +++ b/unit-tests/test/script/parser/setup-teardown.test @@ -1,43 +1,83 @@ -$* <"+cmd;" 2>>EOE != 0 # semi-after-setup -testscript:1:5: error: ';' after setup command -EOE - -$* <"+cmd:" 2>>EOE != 0 # colon-after-setup -testscript:1:5: error: ':' after setup command -EOE - -$* <"-cmd;" 2>>EOE != 0 # semi-after-tdown -testscript:1:5: error: ';' after teardown command -EOE - -$* <"-cmd:" 2>>EOE != 0 # colon-after-tdown -testscript:1:5: error: ':' after teardown command -EOE - -$* <<EOI 2>>EOE != 0 # setup-in-test -cmd; -+cmd -EOI -testscript:2:1: error: setup command in test -EOE - -$* <<EOI 2>>EOE != 0 # tdown-in-test -cmd; --cmd -EOI -testscript:2:1: error: teardown command in test -EOE - -$* <<EOI 2>>EOE != 0 # setup-after-test -cmd -+cmd -EOI -testscript:2:1: error: setup command after tests -EOE - -$* <<EOI 2>>EOE != 0 # setup-after-tdownt --cmd -+cmd -EOI -testscript:2:1: error: setup command after teardown -EOE +# file : unit-tests/test/script/parser/setup-teardown.test +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +: setup +: +{ + : followed + : + { + : semi + : + $* <"+cmd;" 2>>EOE != 0 + testscript:1:5: error: ';' after setup command + EOE + + : colon + : + $* <"+cmd:" 2>>EOE != 0 + testscript:1:5: error: ':' after setup command + EOE + } + + : after + : + { + : test + : + $* <<EOI 2>>EOE != 0 + cmd + +cmd + EOI + testscript:2:1: error: setup command after tests + EOE + + : after-tdownt + : + $* <<EOI 2>>EOE != 0 + -cmd + +cmd + EOI + testscript:2:1: error: setup command after teardown + EOE + } + + : in-test + : + $* <<EOI 2>>EOE != 0 + cmd; + +cmd + EOI + testscript:2:1: error: setup command in test + EOE +} + +: tdown +: +{ + : followed + : + { + : semi + : + $* <"-cmd;" 2>>EOE != 0 + testscript:1:5: error: ';' after teardown command + EOE + + : colon + : + $* <"-cmd:" 2>>EOE != 0 + testscript:1:5: error: ':' after teardown command + EOE + } + + : in-test + : + $* <<EOI 2>>EOE != 0 + cmd; + -cmd + EOI + testscript:2:1: error: teardown command in test + EOE +} |