Changeset 3452 for trunk/src/kash/tests


Ignore:
Timestamp:
Sep 13, 2020, 1:29:07 PM (5 years ago)
Author:
bird
Message:

kash: tests/pipe-2 can't be using the same file in both ends of the pipe.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/tests/pipe-2

    r2285 r3452  
    55. ${KASH_TEST_DIR}/common-include.sh
    66
    7 TMPFILE="/tmp/pipe-2.$$.tmp"
    8 echo piped > $TMPFILE
    9 $CMD_CAT $TMPFILE \
     7TMPFILE1="/tmp/pipe-2a.$$.tmp"
     8TMPFILE2="/tmp/pipe-2b.$$.tmp"
     9echo piped > $TMPFILE1
     10$CMD_CAT $TMPFILE1 \
    1011        | $CMD_SED -e 's/piped/abc/' \
    1112        | $CMD_SED -e 's/abc/def/'  \
     
    1718        | $CMD_SED -e 's/stu/vwx/'  \
    1819        | $CMD_SED -e 's/vwx/yz_/'  \
    19         > $TMPFILE
     20        > $TMPFILE2
    2021
    21 VAR=`$CMD_CAT $TMPFILE`
    22 $CMD_RM -f $TMPFILE
     22VAR=`$CMD_CAT $TMPFILE2`
     23$CMD_RM -f -- $TMPFILE1 $TMPFILE2
    2324if test "$VAR" != "yz_"; then
    2425    echo "pipe-2: FAILURE - VAR=$VAR"
Note: See TracChangeset for help on using the changeset viewer.