Checkpoint updating tests.
Chris Pressey
2 years ago
0 | 0 |
#!/bin/sh
|
1 | 1 |
|
2 | |
if [ "$1" == "-f"]; then
|
3 | |
cat <"$2"
|
4 | |
elif [ "$1" == "-o"]; then
|
|
2 |
if [ "x$1" = "x-f" ]; then
|
|
3 |
if [ "x$3" = "x-o" ]; then
|
|
4 |
cat <"$2" >"$4"
|
|
5 |
else
|
|
6 |
cat <"$2"
|
|
7 |
fi
|
|
8 |
elif [ "x$1" = "x-o" ]; then
|
5 | 9 |
cat >"$2"
|
6 | 10 |
else
|
7 | 11 |
cat
|
0 | 0 |
#!/bin/sh
|
1 | 1 |
|
2 | |
printf %s\\n $*
|
|
2 |
if [ "x$1" = "x-n" ]; then
|
|
3 |
printf %s "$2"
|
|
4 |
else
|
|
5 |
printf %s\\n "$1"
|
|
6 |
fi
|
4 | 4 |
the test output or not.
|
5 | 5 |
|
6 | 6 |
-> Functionality "Echo" is implemented by
|
7 | |
-> shell command "python echo.py %(test-body-text)"
|
|
7 |
-> shell command "./echo.sh %(test-body-text)"
|
8 | 8 |
|
9 | 9 |
-> Tests for functionality "Echo"
|
10 | 10 |
|
|
17 | 17 |
= hi
|
18 | 18 |
|
19 | 19 |
-> Functionality "Echo, no newline" is implemented by
|
20 | |
-> shell command "python echo.py -n %(test-body-text)"
|
|
20 |
-> shell command "./echo.sh -n %(test-body-text)"
|
21 | 21 |
|
22 | 22 |
-> Tests for functionality "Echo, no newline"
|
23 | 23 |
|