mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-30 17:41:14 -03:00
Remove TMPDIR dependency from tests/
Tests are now executed in a test-specific temporary directory, so test output on failure should be reproducible/reusable as-is without needing to have TMPDIR defined (as it only exists by default under macOS).
This commit is contained in:
committed by
Johannes Altmanninger
parent
6fc8038b4e
commit
e96b6e157c
@@ -42,12 +42,12 @@ end
|
||||
# Simple function tests
|
||||
|
||||
function foo
|
||||
echo >$TMPDIR/fish_foo.txt $argv
|
||||
echo >./fish_foo.txt $argv
|
||||
end
|
||||
|
||||
foo hello
|
||||
|
||||
cat $TMPDIR/fish_foo.txt |read foo
|
||||
cat ./fish_foo.txt |read foo
|
||||
|
||||
if test $foo = hello;
|
||||
echo Test 2 pass
|
||||
@@ -327,10 +327,10 @@ type -q -f fish_test_type_zzz ; echo $status
|
||||
|
||||
# ensure that builtins that produce no output can still truncate files
|
||||
# (bug PCA almost reintroduced!)
|
||||
echo abc > $TMPDIR/file_truncation_test.txt
|
||||
cat $TMPDIR/file_truncation_test.txt
|
||||
echo -n > $TMPDIR/file_truncation_test.txt
|
||||
cat $TMPDIR/file_truncation_test.txt
|
||||
echo abc > ./file_truncation_test.txt
|
||||
cat ./file_truncation_test.txt
|
||||
echo -n > ./file_truncation_test.txt
|
||||
cat ./file_truncation_test.txt
|
||||
#CHECK: abc
|
||||
|
||||
# Test events.
|
||||
|
||||
Reference in New Issue
Block a user