aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build/script/parser+line.test.testscript
blob: fe382499cbcc31516d44ee2726e1df7ef5226a9d (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
# file      : libbuild2/build/script/parser+line.test.testscript
# license   : MIT; see accompanying LICENSE file

test.options += -d

#\
: if-else
:
$* <<EOI >|
  if foo
    bar
  elif fox
    baz
  end
  if! foo
    bar
  elif! fox
    baz
  end
  EOI

: command
:
$* <<EOI >|
  foo >| 2>- &a &?b
  foo >=c 2>~/error:.*/ &!c
  foo >>:/~%EOF%
  %.*
  abc
  %xyz.*%
  EOF
  EOI

: quoting
:
$* <<EOI >|
  foo 'bar' "baz" '' ""
  EOI
#\

#\
  libbuild2/lexer+quoting.test.testscript

  : tmp
  :
    $* <'f"oo" "foo$"'

#\