|
Last change
on this file since 2912 was 2285, checked in by bird, 17 years ago |
|
kash/tests: more tests.
|
-
Property svn:eol-style
set to
LF
|
|
File size:
631 bytes
|
| Line | |
|---|
| 1 | #!/bin/sh
|
|---|
| 2 |
|
|---|
| 3 | # Pipes input from an builtin command thru an external one.
|
|---|
| 4 |
|
|---|
| 5 | . ${KASH_TEST_DIR}/common-include.sh
|
|---|
| 6 |
|
|---|
| 7 | TMPFILE="/tmp/pipe-2.$$.tmp"
|
|---|
| 8 | echo piped > $TMPFILE
|
|---|
| 9 | $CMD_CAT $TMPFILE \
|
|---|
| 10 | | $CMD_SED -e 's/piped/abc/' \
|
|---|
| 11 | | $CMD_SED -e 's/abc/def/' \
|
|---|
| 12 | | $CMD_SED -e 's/def/ghi/' \
|
|---|
| 13 | | $CMD_SED -e 's/ghi/jkl/' \
|
|---|
| 14 | | $CMD_SED -e 's/jkl/mno/' \
|
|---|
| 15 | | $CMD_SED -e 's/mno/pqr/' \
|
|---|
| 16 | | $CMD_SED -e 's/pqr/stu/' \
|
|---|
| 17 | | $CMD_SED -e 's/stu/vwx/' \
|
|---|
| 18 | | $CMD_SED -e 's/vwx/yz_/' \
|
|---|
| 19 | > $TMPFILE
|
|---|
| 20 |
|
|---|
| 21 | VAR=`$CMD_CAT $TMPFILE`
|
|---|
| 22 | $CMD_RM -f $TMPFILE
|
|---|
| 23 | if test "$VAR" != "yz_"; then
|
|---|
| 24 | echo "pipe-2: FAILURE - VAR=$VAR"
|
|---|
| 25 | exit 1
|
|---|
| 26 | fi
|
|---|
| 27 | echo "pipe-2: SUCCESS"
|
|---|
| 28 | exit 0
|
|---|
| 29 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.