tests/test-run-tests.t
author Mads Kiilerich <mads@kiilerich.com>
Mon, 08 Nov 2010 01:35:40 +0100
branchstable
changeset 12940 518dd70d1a6e
parent 12406 66a07fb76ceb
child 15249 f30c0a7b8346
permissions -rw-r--r--
tests: (no-eol) markup for command output without trailing LF Output chunks without a trailing LF will now work but get (no-eol) appended. This change mostly moves code around so we can handle that an output line starts with data from previous command, followed by salt and the next command.

Simple commands:

  $ echo foo
  foo
  $ printf 'oh no'
  oh no (no-eol)
  $ printf 'bar\nbaz\n' | cat
  bar
  baz

Multi-line command:

  $ foo() {
  >     echo bar
  > }
  $ foo
  bar

Regular expressions:

  $ echo foobarbaz
  foobar.* (re)
  $ echo barbazquux
  .*quux.* (re)

Globs:

  $ printf '* \\foobarbaz {10}\n'
  \* \\fo?bar* {10} (glob)

Literal match ending in " (re)":

  $ echo 'foo (re)'
  foo (re)

Exit code:

  $ (exit 1) 
  [1]