# file      : libbuild2/make-parser.test.testscript
# license   : MIT; see accompanying LICENSE file

windows = ($cxx.target.class == 'windows')

: valid
:
$* <<EOI >>EOO
  foo:

  foo: bar

  foo: bar baz

  foo: bar \
  baz

  foo: bar\
  baz

  foo:\
  bar baz\
  fox

  foo: bar \
  \
  baz

  foo: bar\

  foo bar: baz

  foo \
  bar: baz

  foo \
  bar \
  : baz

  \
  foo: bar
  EOI
  T foo

  T foo
  P bar

  T foo
  P bar
  P baz

  T foo
  P bar
  P baz

  T foo
  P bar
  P baz

  T foo
  P
  P bar
  P baz
  P fox

  T foo
  P bar
  P
  P baz

  T foo
  P bar
  P

  T foo
  T bar
  P baz

  T foo
  T bar
  P baz

  T foo
  T bar
  T
  P baz

  T
  T foo
  P bar
  EOO

: escape
:
$* <<EOI >>EOO
  \#foo\:\ bar: fox$$\\baz
  EOI
  T #foo: bar
  P fox$\baz
  EOO

: windows
:
if $windows
{{
  $* <<EOI >>EOO
    foo: c:\tmp\bar

    c:\tmp\foo: c:\tmp\bar \
    c:\tmp\baz

    c:\\tmp\\foo: c:\\tmp\\bar

    c:\x:c:\y
    EOI
    T foo
    P c:\tmp\bar

    T c:\tmp\foo
    P c:\tmp\bar
    P c:\tmp\baz

    T c:\tmp\foo
    P c:\tmp\bar

    T c:\x
    P c:\y
    EOO
}}
