test-run-tests.t
99 lines
| 1.2 KiB
| text/troff
|
Tads3Lexer
/ tests / test-run-tests.t
Brodie Rao
|
r12375 | Simple commands: | ||
$ echo foo | ||||
foo | ||||
Mads Kiilerich
|
r12940 | $ printf 'oh no' | ||
oh no (no-eol) | ||||
Matt Mackall
|
r12377 | $ printf 'bar\nbaz\n' | cat | ||
Brodie Rao
|
r12375 | bar | ||
baz | ||||
Multi-line command: | ||||
$ foo() { | ||||
> echo bar | ||||
> } | ||||
$ foo | ||||
bar | ||||
Matt Mackall
|
r15434 | Return codes before inline python: | ||
Mads Kiilerich
|
r16014 | $ sh -c 'exit 1' | ||
Matt Mackall
|
r15434 | [1] | ||
Idan Kamara
|
r15249 | Doctest commands: | ||
>>> print 'foo' | ||||
foo | ||||
$ echo interleaved | ||||
interleaved | ||||
>>> for c in 'xyz': | ||||
... print c | ||||
x | ||||
y | ||||
z | ||||
Matt Mackall
|
r15434 | |||
Idan Kamara
|
r15249 | |||
Brodie Rao
|
r12375 | Regular expressions: | ||
$ echo foobarbaz | ||||
foobar.* (re) | ||||
$ echo barbazquux | ||||
.*quux.* (re) | ||||
Brodie Rao
|
r12376 | Globs: | ||
Matt Mackall
|
r12377 | $ printf '* \\foobarbaz {10}\n' | ||
Brodie Rao
|
r12376 | \* \\fo?bar* {10} (glob) | ||
Brodie Rao
|
r12375 | Literal match ending in " (re)": | ||
$ echo 'foo (re)' | ||||
foo (re) | ||||
Adrian Buehlmann
|
r16891 | testing hghave | ||
$ "$TESTDIR/hghave" true | ||||
$ "$TESTDIR/hghave" false | ||||
skipped: missing feature: nail clipper | ||||
[1] | ||||
$ "$TESTDIR/hghave" no-true | ||||
skipped: system supports yak shaving | ||||
[1] | ||||
$ "$TESTDIR/hghave" no-false | ||||
Mads Kiilerich
|
r16842 | Conditional sections based on hghave: | ||
Adrian Buehlmann
|
r16891 | #if true | ||
$ echo tested | ||||
tested | ||||
#else | ||||
$ echo skipped | ||||
#endif | ||||
#if false | ||||
Mads Kiilerich
|
r16842 | $ echo skipped | ||
#else | ||||
$ echo tested | ||||
tested | ||||
#endif | ||||
Adrian Buehlmann
|
r16914 | #if no-false | ||
$ echo tested | ||||
tested | ||||
#else | ||||
$ echo skipped | ||||
#endif | ||||
#if no-true | ||||
$ echo skipped | ||||
#else | ||||
$ echo tested | ||||
tested | ||||
#endif | ||||
Brodie Rao
|
r12375 | Exit code: | ||
Mads Kiilerich
|
r12406 | $ (exit 1) | ||
Brodie Rao
|
r12375 | [1] | ||