aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/test
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-01-18 18:38:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-01-18 18:38:06 +0200
commit8ecc2d18bf86b1021a31a2e5d01e71afbaa1efd0 (patch)
tree3b83ee62860ef53121e1a20dcad78af4a5698121 /unit-tests/test
parent34faaea18926120fa9cd68686fe69d81b81ad4b7 (diff)
Add missing diagnostics in testscript parser
Diffstat (limited to 'unit-tests/test')
-rw-r--r--unit-tests/test/script/parser/setup-teardown.test68
1 files changed, 68 insertions, 0 deletions
diff --git a/unit-tests/test/script/parser/setup-teardown.test b/unit-tests/test/script/parser/setup-teardown.test
index c9183ef..6711442 100644
--- a/unit-tests/test/script/parser/setup-teardown.test
+++ b/unit-tests/test/script/parser/setup-teardown.test
@@ -81,3 +81,71 @@
testscript:2:1: error: teardown command in test
EOE
}
+
+: var
+:
+{
+ : between-tests
+ :
+ $* <<EOI 2>>EOE != 0
+ cmd
+ x = y
+ cmd
+ EOI
+ testscript:3:1: error: test after teardown
+ testscript:2:1: info: last teardown line appears here
+ EOE
+
+ : between-tests-scope
+ :
+ $* <<EOI 2>>EOE != 0
+ cmd
+ x = y
+ {
+ cmd
+ }
+ EOI
+ testscript:3:1: error: scope after teardown
+ testscript:2:1: info: last teardown line appears here
+ EOE
+
+ : between-tests-command-if
+ :
+ $* <<EOI 2>>EOE != 0
+ cmd
+ x = y
+ if true
+ cmd
+ end
+ EOI
+ testscript:3:1: error: test after teardown
+ testscript:2:1: info: last teardown line appears here
+ EOE
+
+ : between-tests-scope-if
+ :
+ $* <<EOI 2>>EOE != 0
+ cmd
+ x = y
+ if true
+ {
+ cmd
+ }
+ EOI
+ testscript:3:1: error: scope after teardown
+ testscript:2:1: info: last teardown line appears here
+ EOE
+
+ : between-tests-variable-if
+ :
+ $* <<EOI >>EOO
+ cmd
+ x = y
+ if true
+ y = x
+ end
+ EOI
+ cmd
+ ? true
+ EOO
+}