mirror of
https://github.com/tmux/tmux.git
synced 2025-01-07 16:28:48 +00:00
source-file too.
This commit is contained in:
parent
6b2d850e54
commit
e4b4125310
@ -10,8 +10,9 @@ TMUX="$TEST_TMUX -Ltest"
|
|||||||
$TMUX kill-server 2>/dev/null
|
$TMUX kill-server 2>/dev/null
|
||||||
|
|
||||||
TMP=$(mktemp)
|
TMP=$(mktemp)
|
||||||
|
OUT=$(mktemp)
|
||||||
SCRIPT=$(mktemp)
|
SCRIPT=$(mktemp)
|
||||||
trap "rm -f $TMP $SCRIPT" 0 1 15
|
trap "rm -f $TMP $OUT $SCRIPT" 0 1 15
|
||||||
|
|
||||||
cat <<EOF >$SCRIPT
|
cat <<EOF >$SCRIPT
|
||||||
(
|
(
|
||||||
@ -20,7 +21,7 @@ echo PWD=\$(pwd)
|
|||||||
echo PATH=\$PATH
|
echo PATH=\$PATH
|
||||||
echo SHELL=\$SHELL
|
echo SHELL=\$SHELL
|
||||||
echo TEST=\$TEST
|
echo TEST=\$TEST
|
||||||
) >$TMP
|
) >$OUT
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >$TMP
|
cat <<EOF >$TMP
|
||||||
@ -30,7 +31,7 @@ EOF
|
|||||||
(cd /; env -i TERM=ansi TEST=test1 PATH=1 SHELL=/bin/sh \
|
(cd /; env -i TERM=ansi TEST=test1 PATH=1 SHELL=/bin/sh \
|
||||||
$TMUX -f$TMP start) || exit 1
|
$TMUX -f$TMP start) || exit 1
|
||||||
sleep 1
|
sleep 1
|
||||||
(cat <<EOF|cmp -s - $TMP) || exit 1
|
(cat <<EOF|cmp -s - $OUT) || exit 1
|
||||||
TERM=screen
|
TERM=screen
|
||||||
PWD=/
|
PWD=/
|
||||||
PATH=1
|
PATH=1
|
||||||
@ -41,7 +42,18 @@ EOF
|
|||||||
(cd /; env -i TERM=ansi TEST=test2 PATH=2 SHELL=/bin/sh \
|
(cd /; env -i TERM=ansi TEST=test2 PATH=2 SHELL=/bin/sh \
|
||||||
$TMUX new -d -- /bin/sh $SCRIPT) || exit 1
|
$TMUX new -d -- /bin/sh $SCRIPT) || exit 1
|
||||||
sleep 1
|
sleep 1
|
||||||
(cat <<EOF|cmp -s - $TMP) || exit 1
|
(cat <<EOF|cmp -s - $OUT) || exit 1
|
||||||
|
TERM=screen
|
||||||
|
PWD=/
|
||||||
|
PATH=2
|
||||||
|
SHELL=/bin/sh
|
||||||
|
TEST=test2
|
||||||
|
EOF
|
||||||
|
|
||||||
|
(cd /; env -i TERM=ansi TEST=test3 PATH=3 SHELL=/bin/sh \
|
||||||
|
$TMUX new -d source $TMP) || exit 1
|
||||||
|
sleep 1
|
||||||
|
(cat <<EOF|cmp -s - $OUT) || exit 1
|
||||||
TERM=screen
|
TERM=screen
|
||||||
PWD=/
|
PWD=/
|
||||||
PATH=2
|
PATH=2
|
||||||
|
Loading…
Reference in New Issue
Block a user