aboutsummaryrefslogtreecommitdiff
path: root/tests/tab-parser/testscript
blob: 1b0a816a582641791f2e3350f7f27cba80785156 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# file      : tests/tab-parser/testscript
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

: valid
:
: Roundtrip tab-files.
:
{
  : newline-term
  :
  $* <<EOF >>EOF
  abc
  def xyz
  fff
  EOF

  : eos-term
  :
  $* <:'abc' >'abc'

  : empty-lines
  :
  $* <<EOI >'def'
  # abc

    # abc
  def

  EOI

  : quoting
  :
  $* -l <<EOI >>EOO
  def k" l'"'m n"' xyz
  EOI
  def
  k" l'"'m n"'
  xyz
  EOO
}

: invalid
:
{
  : unterm-quoting
  :
  $* <'ab"c' 2>'cin:1:5: error: unterminated quoted string' == 1
}