|
Last change
on this file since 2305 was 2284, checked in by bird, 16 years ago |
|
kash/tests: more tests.
|
-
Property svn:eol-style
set to
LF
-
Property svn:executable
set to
*
|
|
File size:
353 bytes
|
| Line | |
|---|
| 1 | #!/bin/sh
|
|---|
| 2 |
|
|---|
| 3 | # Redirect output from builtin commands in a subshell.
|
|---|
| 4 |
|
|---|
| 5 | . ${KASH_TEST_DIR}/common-include.sh
|
|---|
| 6 |
|
|---|
| 7 | TMPFILE="/tmp/redirect-2.$$.tmp"
|
|---|
| 8 |
|
|---|
| 9 | (echo -n 1 ; echo -n 2 ; echo -n 3 ) > $TMPFILE
|
|---|
| 10 | VAR=`$CMD_CAT $TMPFILE`
|
|---|
| 11 | $CMD_RM -f $TMPFILE
|
|---|
| 12 | if test "$VAR" != "123"; then
|
|---|
| 13 | echo "redirect-2: FAILURE - VAR=$VAR"
|
|---|
| 14 | exit 1
|
|---|
| 15 | fi
|
|---|
| 16 | echo "redirect-2: SUCCESS"
|
|---|
| 17 | exit 0
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.