mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-30 06:03:49 +08:00
Minor fix in testsuite
darcs-hash:20050927174025-ac50b-554f6bf9aefc2da0b5a40baebb44bcd02a933704.gz
This commit is contained in:
parent
8c7c3bd787
commit
1ecfc8e4c6
|
@ -24,25 +24,25 @@ end
|
||||||
|
|
||||||
set -e t3
|
set -e t3
|
||||||
if true
|
if true
|
||||||
set -l t3 bar
|
set -l t3 bar
|
||||||
end
|
end
|
||||||
|
|
||||||
if test $t3
|
if test $t3
|
||||||
echo Test 3 fail
|
echo Test 3 fail
|
||||||
else
|
else
|
||||||
echo Test 3 pass
|
echo Test 3 pass
|
||||||
end
|
end
|
||||||
|
|
||||||
# Test if globals can be set in block scope
|
# Test if globals can be set in block scope
|
||||||
|
|
||||||
if true
|
if true
|
||||||
set -g baz qux
|
set -g baz qux
|
||||||
end
|
end
|
||||||
|
|
||||||
if test $baz = qux
|
if test $baz = qux
|
||||||
echo Test 4 pass
|
echo Test 4 pass
|
||||||
else
|
else
|
||||||
echo Test 4 fail
|
echo Test 4 fail
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,13 +51,13 @@ end
|
||||||
set t5 a
|
set t5 a
|
||||||
|
|
||||||
if true
|
if true
|
||||||
set t5 b
|
set t5 b
|
||||||
end
|
end
|
||||||
|
|
||||||
if test $t5 = b
|
if test $t5 = b
|
||||||
echo Test 5 pass
|
echo Test 5 pass
|
||||||
else
|
else
|
||||||
echo Test 5 fail
|
echo Test 5 fail
|
||||||
end
|
end
|
||||||
|
|
||||||
# Test that scope is preserved in double blocks
|
# Test that scope is preserved in double blocks
|
||||||
|
@ -65,7 +65,7 @@ end
|
||||||
for i in 1
|
for i in 1
|
||||||
set t6 $i
|
set t6 $i
|
||||||
for j in a
|
for j in a
|
||||||
if test $t6$j = 1a
|
if test $t6$j = 1a
|
||||||
echo Test 6 pass
|
echo Test 6 pass
|
||||||
else
|
else
|
||||||
echo Test 6 fail
|
echo Test 6 fail
|
||||||
|
@ -79,13 +79,13 @@ end
|
||||||
set res fail
|
set res fail
|
||||||
|
|
||||||
for i in 1 2
|
for i in 1 2
|
||||||
if test $i = 1
|
if test $i = 1
|
||||||
set t7 b
|
set t7 b
|
||||||
else
|
else
|
||||||
if test $t7 = b
|
if test $t7 = b
|
||||||
set res pass
|
set res pass
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
echo Test 7 $res
|
echo Test 7 $res
|
||||||
|
@ -94,20 +94,20 @@ echo Test 7 $res
|
||||||
|
|
||||||
set -e t8
|
set -e t8
|
||||||
if true
|
if true
|
||||||
set -lx t8 foo
|
set -lx t8 foo
|
||||||
if test (fish -c "echo $t8") = foo
|
if test (../fish -c "echo $t8") = foo
|
||||||
echo Test 8 pass
|
echo Test 8 pass
|
||||||
else
|
else
|
||||||
echo Test 8 fail
|
echo Test 8 fail
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Test if exported variables go out of scope
|
# Test if exported variables go out of scope
|
||||||
|
|
||||||
if test (../fish -c "echo $t8") = foo
|
if test (../fish -c "echo $t8")
|
||||||
echo Test 9 fail
|
echo Test 9 fail
|
||||||
else
|
else
|
||||||
echo Test 9 pass
|
echo Test 9 pass
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user