aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/test/script/parser/here-document.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/here-document.testscript
parent8ca10194e206a181797ffb7a73dd2deee12ac753 (diff)
Use new setup for unit tests
Diffstat (limited to 'unit-tests/test/script/parser/here-document.testscript')
-rw-r--r--unit-tests/test/script/parser/here-document.testscript213
1 files changed, 0 insertions, 213 deletions
diff --git a/unit-tests/test/script/parser/here-document.testscript b/unit-tests/test/script/parser/here-document.testscript
deleted file mode 100644
index de6255e..0000000
--- a/unit-tests/test/script/parser/here-document.testscript
+++ /dev/null
@@ -1,213 +0,0 @@
-# file : unit-tests/test/script/parser/here-document.testscript
-# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
-# license : MIT; see accompanying LICENSE file
-
-: end-marker
-:
-{
- : missing-newline
- :
- $* <'cmd <<' 2>>EOE != 0
- testscript:1:7: error: expected here-document end marker
- EOE
-
- : missing-exit
- :
- $* <'cmd << != 0' 2>>EOE != 0
- testscript:1:8: error: expected here-document end marker
- EOE
-
- : missing-empty
- :
- $* <'cmd <<""' 2>>EOE != 0
- testscript:1:7: error: expected here-document end marker
- EOE
-
- : unseparated-expansion
- :
- $* <'cmd <<FOO$foo' 2>>EOE != 0
- testscript:1:10: error: here-document end marker must be literal
- EOE
-
- : quoted-single-partial
- :
- $* <"cmd <<F'O'O" 2>>EOE != 0
- testscript:1:7: error: partially-quoted here-document end marker
- EOE
-
- : quoted-double-partial
- :
- $* <'cmd <<"FO"O' 2>>EOE != 0
- testscript:1:7: error: partially-quoted here-document end marker
- EOE
-
- : quoted-mixed
- :
- $* <"cmd <<\"FO\"'O'" 2>>EOE != 0
- testscript:1:7: error: partially-quoted here-document end marker
- EOE
-
- : unseparated
- :
- $* <<EOI >>EOO
- cmd <<EOF!=0
- foo
- EOF
- EOI
- cmd <<EOF != 0
- foo
- EOF
- EOO
-
- : quoted-single
- :
- $* <<EOI >>EOO
- cmd <<'EOF'
- foo
- EOF
- EOI
- cmd <<EOF
- foo
- EOF
- EOO
-
- : quoted-double
- :
- $* <<EOI >>EOO
- cmd <<"EOF"
- foo
- EOF
- EOI
- cmd <<EOF
- foo
- EOF
- EOO
-}
-
-: indent
-:
-{
- : basic
- :
- $* <<EOI >>EOO
- cmd <<EOF
- foo
- bar
- baz
- EOF
- EOI
- cmd <<EOF
- foo
- bar
- baz
- EOF
- EOO
-
- : blank
- :
- $* <<EOI >>EOO
- cmd <<EOF
- foo
-
-
- bar
- EOF
- EOI
- cmd <<EOF
- foo
-
-
- bar
- EOF
- EOO
-
- : non-ws-prefix
- :
- $* <<EOI >>EOO
- cmd <<EOF
- x EOF
- EOF
- EOI
- cmd <<EOF
- x EOF
- EOF
- EOO
-
- : whole-token
- : Test the case where the indentation is a whole token
- :
- $* <<EOI >>EOO
- x = foo bar
- cmd <<"EOF"
- $x
- EOF
- EOI
- cmd <<EOF
- foo bar
- EOF
- EOO
-
- : long-line
- : Test the case where the line contains multiple tokens
- :
- $* <<EOI >>EOO
- x = foo
- cmd <<"EOF"
- $x bar $x
- EOF
- EOI
- cmd <<EOF
- foo bar foo
- EOF
- EOO
-
- : unindented
- :
- $* <<EOI 2>>EOE != 0
- cmd <<EOF
- bar
- EOF
- EOI
- testscript:2:1: error: unindented here-document line
- EOE
-}
-
-: blank
-:
-$* <<EOI >>EOO
-cmd <<EOF
-
-foo
-
-bar
-
-EOF
-EOI
-cmd <<EOF
-
-foo
-
-bar
-
-EOF
-EOO
-
-: quote
-:
-: Note: they are still recognized in eval contexts.
-:
-$* <<EOI >>EOO
-cmd <<"EOF"
-'single'
-"double"
-b'o't"h"
-('single' "double")
-EOF
-EOI
-cmd <<EOF
-'single'
-"double"
-b'o't"h"
-single double
-EOF
-EOO