aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/test/script/parser/scope.test
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-09-03 16:37:32 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2018-09-04 16:29:59 +0300
commit5007870b52aa549971824959a55ad3bb886f09e0 (patch)
treeb0ef7f24c0b9ece2ed23f3c1792f16da324e4171 /unit-tests/test/script/parser/scope.test
parent09d60452a80d14d9b8bf3a9395860b50683fa1e8 (diff)
Rename .test/test{} to .testscript/testscript{}
Diffstat (limited to 'unit-tests/test/script/parser/scope.test')
-rw-r--r--unit-tests/test/script/parser/scope.test280
1 files changed, 0 insertions, 280 deletions
diff --git a/unit-tests/test/script/parser/scope.test b/unit-tests/test/script/parser/scope.test
deleted file mode 100644
index 21a6f50..0000000
--- a/unit-tests/test/script/parser/scope.test
+++ /dev/null
@@ -1,280 +0,0 @@
-# file : unit-tests/test/script/parser/scope.test
-# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd
-# license : MIT; see accompanying LICENSE file
-
-$* testscript <'cmd $@' >"cmd 1" : id-testscript
-$* foo.test <'cmd $@' >"cmd foo/1" : id
-
-: wd-testscript
-:
-$* testscript <'cmd "$~"' >~"%cmd '?.+[/\\\\]test-driver[/\\\\]1'?%"
-
-: wd
-:
-$* foo.test <'cmd "$~"' >~"%cmd '?.+[/\\\\]test-driver[/\\\\]foo[/\\\\]1'?%"
-
-: group
-:
-{
- : empty
- :
- $* -s <<EOI
- {
- }
- EOI
-
- : empty-empty
- :
- $* -s <<EOI
- {
- {
- }
- }
- EOI
-
- : non-empty
- :
- $* -s <<EOI >>EOO
- {
- cmd1
- cmd2
- }
- EOI
- {
- {
- {
- cmd1
- }
- {
- cmd2
- }
- }
- }
- EOO
-}
-
-: test
-:
-{
- : explicit
- :
- {
- : one-level
- :
- $* -s -i <<EOI >>EOO
- {
- cmd
- }
- EOI
- {
- { # 1
- cmd
- }
- }
- EOO
-
- : nested
- :
- $* -s -i <<EOI >>EOO
- {
- {
- cmd
- }
- }
- EOI
- {
- { # 1
- cmd
- }
- }
- EOO
-
- : var
- :
- $* -s -i <<EOI >>EOO
- {
- x = abc
- cmd $x
- }
- EOI
- {
- { # 1
- cmd abc
- }
- }
- EOO
-
- : setup
- :
- $* -s -i <<EOI >>EOO
- {
- x = abc
- +setup
- cmd $x
- }
- EOI
- {
- { # 1
- +setup
- { # 1/4
- cmd abc
- }
- }
- }
- EOO
- }
-
- : implicit
- {
- : one-cmd
- :
- $* -s <<EOI >>EOO
- cmd1
- EOI
- {
- {
- cmd1
- }
- }
- EOO
-
- : two-cmd
- :
- $* -s <<EOI >>EOO
- cmd1;
- cmd2
- EOI
- {
- {
- cmd1
- cmd2
- }
- }
- EOO
-
- : three-cmd
- :
- $* -s <<EOI >>EOO
- cmd1;
- cmd2;
- cmd3
- EOI
- {
- {
- cmd1
- cmd2
- cmd3
- }
- }
- EOO
-
- : var
- :
- $* -s <<EOI >>EOO
- cmd1;
- x = abc;
- cmd2 $x
- EOI
- {
- {
- cmd1
- cmd2 abc
- }
- }
- EOO
-
- : var-first
- :
- $* -s <<EOI >>EOO
- x = abc;
- cmd $x
- EOI
- {
- {
- cmd abc
- }
- }
- EOO
-
- : var-setup-tdown
- :
- $* -s <<EOI >>EOO
- x = abc
- cmd $x
- y = 123
- EOI
- {
- {
- cmd abc
- }
- }
- EOO
-
- : after-tdown
- :
- $* <<EOI 2>>EOE != 0
- cmd1
- x = abc
- cmd2
- EOI
- testscript:3:1: error: test after teardown
- testscript:2:1: info: last teardown line appears here
- EOE
- }
-}
-
-: expected
-{
- : newline-lcbrace
- :
- $* <:"{x" 2>>EOE != 0
- testscript:1:2: error: expected newline after '{'
- EOE
-
- : rcbrace
- :
- $* <"{" 2>>EOE != 0
- testscript:2:1: error: expected '}' at the end of the scope
- EOE
-
- : line-rcbrace
- :
- $* <<EOI 2>>EOE != 0
- {
- cmd;
- }
- EOI
- testscript:3:1: error: expected another line after ';'
- EOE
-
- : newline-rcbrace
- :
- $* <<:EOI 2>>EOE != 0
- {
- }
- EOI
- testscript:2:2: error: expected newline after '}'
- EOE
-
- : line-eof
- :
- $* <<EOI 2>>EOE != 0
- cmd;
- EOI
- testscript:2:1: error: expected another line after ';'
- EOE
-
- : newline-cmd
- :
- $* <<:EOI 2>>EOE != 0
- cmd;
- EOI
- testscript:1:5: error: expected newline instead of <end of file>
- EOE
-
- : newline-var
- :
- $* <:"x = abc;" 2>>EOE != 0
- testscript:1:9: error: expected newline instead of <end of file>
- EOE
-}