test-run-tests.t
99 lines
| 1.2 KiB
| text/troff
|
Tads3Lexer
/ tests / test-run-tests.t
|
r12375 | Simple commands: | ||
$ echo foo | ||||
foo | ||||
|
r12940 | $ printf 'oh no' | ||
oh no (no-eol) | ||||
|
r12377 | $ printf 'bar\nbaz\n' | cat | ||
|
r12375 | bar | ||
baz | ||||
Multi-line command: | ||||
$ foo() { | ||||
> echo bar | ||||
> } | ||||
$ foo | ||||
bar | ||||
|
r15434 | Return codes before inline python: | ||
|
r16014 | $ sh -c 'exit 1' | ||
|
r15434 | [1] | ||
|
r15249 | Doctest commands: | ||
>>> print 'foo' | ||||
foo | ||||
$ echo interleaved | ||||
interleaved | ||||
>>> for c in 'xyz': | ||||
... print c | ||||
x | ||||
y | ||||
z | ||||
|
r15434 | |||
|
r15249 | |||
|
r12375 | Regular expressions: | ||
$ echo foobarbaz | ||||
foobar.* (re) | ||||
$ echo barbazquux | ||||
.*quux.* (re) | ||||
|
r12376 | Globs: | ||
|
r12377 | $ printf '* \\foobarbaz {10}\n' | ||
|
r12376 | \* \\fo?bar* {10} (glob) | ||
|
r12375 | Literal match ending in " (re)": | ||
$ echo 'foo (re)' | ||||
foo (re) | ||||
|
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 | ||||
|
r16842 | Conditional sections based on hghave: | ||
|
r16891 | #if true | ||
$ echo tested | ||||
tested | ||||
#else | ||||
$ echo skipped | ||||
#endif | ||||
#if false | ||||
|
r16842 | $ echo skipped | ||
#else | ||||
$ echo tested | ||||
tested | ||||
#endif | ||||
|
r16914 | #if no-false | ||
$ echo tested | ||||
tested | ||||
#else | ||||
$ echo skipped | ||||
#endif | ||||
#if no-true | ||||
$ echo skipped | ||||
#else | ||||
$ echo tested | ||||
tested | ||||
#endif | ||||
|
r12375 | Exit code: | ||
|
r17345 | $ (exit 1) | ||
|
r12375 | [1] | ||