-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
136a7f1
commit 7fbdf2a
Showing
4 changed files
with
23 additions
and
21 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 1. Test that the "echo" command (a shell builtin, usually) | ||
# prints its argument on stdout, prints nothing on stderr, | ||
# and exits with a zero exit code. | ||
|
||
$ echo a | ||
a | ||
|
||
# 2. Test that echo with no arguments prints a blank line, | ||
# no stderr output, and exits with zero. | ||
# Since the output ends with whitespace, this time we must write | ||
# the exit code test (>=) explicitly, to act as a delimiter. | ||
|
||
$ echo | ||
|
||
>= | ||
|
||
# 3. Test that cat with a bad flag prints nothing on stdout, | ||
# an error containing "unrecognized option" or "illegal option" on stderr, | ||
# and exits with non-zero status. | ||
|
||
$ cat --no-such-flag | ||
>2 /(unrecognized|illegal) option/ | ||
>= !0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
|
||
$ shelltest --print=v1 tests/examples/cat.test | diff -u - tests/examples/cat.test | ||
|
||
$ shelltest --print=v1 tests/examples/echo.test | diff -u - tests/examples/echo.test | ||
|
||
$ shelltest --print=v1 tests/format1/abstract-test-with-macros | diff -u - tests/format1/abstract-test-with-macros |