aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/test/script/parser/regex.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-03-06 23:06:30 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-03-08 16:42:31 +0300
commit77410b0cdde47219d6c6a36533fcb9354f17c3dd (patch)
tree703c39f3bc81792fabaf81769035f01a08cf6a2f /unit-tests/test/script/parser/regex.testscript
parent8ca10194e206a181797ffb7a73dd2deee12ac753 (diff)
Use new setup for unit tests
Diffstat (limited to 'unit-tests/test/script/parser/regex.testscript')
-rw-r--r--unit-tests/test/script/parser/regex.testscript223
1 files changed, 0 insertions, 223 deletions
diff --git a/unit-tests/test/script/parser/regex.testscript b/unit-tests/test/script/parser/regex.testscript
deleted file mode 100644
index 216c0c4..0000000
--- a/unit-tests/test/script/parser/regex.testscript
+++ /dev/null
@@ -1,223 +0,0 @@
-# file : unit-tests/test/script/parser/regex.testscript
-# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
-# license : MIT; see accompanying LICENSE file
-
-: here-string
-:
-{
- : stdout
- :
- {
- : missed
- :
- $* <'cmd >~' 2>>EOE != 0
- testscript:1:7: error: missing stdout here-string regex
- EOE
-
- : no-introducer
- :
- $* <'cmd >~""' 2>>EOE != 0
- testscript:1:7: error: no introducer character in stdout regex redirect
- EOE
-
- : no-term-introducer
- :
- $* <'cmd >~/' 2>>EOE != 0
- testscript:1:7: error: no closing introducer character in stdout regex redirect
- EOE
-
- : portable-path-introducer
- :
- $* <'cmd >/~/foo/' 2>>EOE != 0
- testscript:1:8: error: portable path modifier and '/' introducer in stdout regex redirect
- EOE
-
- : empty
- :
- $* <'cmd >~//' 2>>EOE != 0
- testscript:1:7: error: stdout regex redirect is empty
- EOE
-
- : no-flags
- :
- $* <'cmd >~/fo*/' >'cmd >~/fo*/'
-
- : idot
- :
- $* <'cmd >~/fo*/d' >'cmd >~/fo*/d'
-
- : icase
- :
- $* <'cmd >~/fo*/i' >'cmd >~/fo*/i'
-
- : invalid-flags1
- :
- $* <'cmd >~/foo/z' 2>>EOE != 0
- testscript:1:7: error: junk at the end of stdout regex redirect
- EOE
-
- : invalid-flags2
- :
- $* <'cmd >~/foo/iz' 2>>EOE != 0
- testscript:1:7: error: junk at the end of stdout regex redirect
- EOE
-
- : no-newline
- :
- $* <'cmd >:~/fo*/' >'cmd >:~/fo*/'
- }
-
- : stderr
- :
- {
- : missed
- :
- $* <'cmd 2>~' 2>>EOE != 0
- testscript:1:8: error: missing stderr here-string regex
- EOE
-
- : no-introducer
- :
- : Note that there is no need to reproduce all the errors as for stdout.
- : All we need is to make sure that the proper description is passed to
- : the parse_regex() function.
- :
- $* <'cmd 2>~""' 2>>EOE != 0
- testscript:1:8: error: no introducer character in stderr regex redirect
- EOE
- }
-
- : modifier-last
- :
- $* <'cmd >~/x' 2>>EOE != 0
- testscript:1:7: error: no closing introducer character in stdout regex redirect
- EOE
-}
-
-: here-doc
-:
-{
- : stdout
- :
- {
- : missed
- :
- $* <'cmd >>~' 2>>EOE != 0
- testscript:1:8: error: expected here-document regex end marker
- EOE
-
- : portable-path-introducer
- :
- $* <<EOI 2>>EOE != 0
- cmd >>/~/EOO/
- foo
- EOO
- EOI
- testscript:1:5: error: portable path modifier and '/' introducer in here-document regex end marker
- EOE
-
- : unterminated-line-char
- :
- $* <<EOI 2>>EOE != 0
- cmd >>~/EOO/
- /
- EOO
- EOI
- testscript:2:1: error: no syntax line characters
- EOE
-
- : empty
- :
- $* <<EOI 2>>EOE != 0
- cmd >>:~/EOO/
- EOO
- EOI
- testscript:2:1: error: empty here-document regex
- EOE
-
- : no-flags
- :
- $* <<EOI >>EOO
- cmd 2>>~/EOE/
- foo
- /?
- /foo/
- /foo/*
- /foo/i
- /foo/i*
-
- //
- //*
- EOE
- EOI
- cmd 2>>~/EOE/
- foo
- /?
- /foo/
- /foo/*
- /foo/i
- /foo/i*
-
- //
- //*
- EOE
- EOO
-
- : no-newline
- :
- $* <'cmd >:~/fo*/' >'cmd >:~/fo*/'
- $* <<EOI >>EOO
- cmd 2>>:~/EOE/
- foo
- EOE
- EOI
- cmd 2>>:~/EOE/
- foo
- EOE
- EOO
-
- : end-marker-restore
- :
- {
- : idot
- :
- $* <<EOI >>EOO
- cmd 2>>~/EOE/d
- foo
- EOE
- EOI
- cmd 2>>~/EOE/d
- foo
- EOE
- EOO
-
- : icase
- :
- $* <<EOI >>EOO
- cmd 2>>~/EOE/i
- foo
- EOE
- EOI
- cmd 2>>~/EOE/i
- foo
- EOE
- EOO
- }
- }
-
- : stderr
- :
- {
- : missed
- :
- $* <'cmd 2>>~' 2>>EOE != 0
- testscript:1:9: error: expected here-document regex end marker
- EOE
- }
-
- : modifier-last
- :
- $* <'cmd >>~:/FOO/' 2>>EOE != 0
- testscript:1:8: error: expected here-document regex end marker
- EOE
-}