diff --git a/tests/checks/cd.fish b/tests/checks/cd.fish index cdad19798..ec931d3d1 100644 --- a/tests/checks/cd.fish +++ b/tests/checks/cd.fish @@ -216,7 +216,7 @@ function __fish_test_thrash_cd set -l dir (mktemp -d) cd $dir for i in (seq 50) - test (/bin/pwd) = $dir + test (command pwd) = $dir and test $PWD = $dir or echo "cd test failed" 1>&2 sleep .002 diff --git a/tests/checks/complete.fish b/tests/checks/complete.fish index b88c0bccd..cc43e3a40 100644 --- a/tests/checks/complete.fish +++ b/tests/checks/complete.fish @@ -345,8 +345,8 @@ begin rm -rf $parened_path and mkdir $parened_path and mkdir $parened_subpath - and ln -s /bin/ls $parened_path/'__test6_(paren)_command' - and ln -s /bin/ls $parened_subpath/'__test6_subdir_(paren)_command' + and ln -s (command -v ls) $parened_path/'__test6_(paren)_command' + and ln -s (command -v ls) $parened_subpath/'__test6_subdir_(paren)_command' end echo "error: could not create command expansion temp environment" >&2 end diff --git a/tests/checks/job-control-noninteractive.fish b/tests/checks/job-control-noninteractive.fish index 6873ec85a..c76e1883a 100644 --- a/tests/checks/job-control-noninteractive.fish +++ b/tests/checks/job-control-noninteractive.fish @@ -4,7 +4,7 @@ # Ensure job control works in non-interactive environments. status job-control full -/bin/echo hello +command echo hello #CHECK: hello $fth print_pgrp | read first diff --git a/tests/checks/jobs.fish b/tests/checks/jobs.fish index b691065cc..cd7413264 100644 --- a/tests/checks/jobs.fish +++ b/tests/checks/jobs.fish @@ -83,7 +83,7 @@ foo sleep 1 & set sleep_job $last_pid function sleep_done_$sleep_job --on-job-exit $sleep_job - /bin/echo "sleep is done" + command echo "sleep is done" functions --erase sleep_done_$sleep_job end sleep 2 diff --git a/tests/checks/output-buffering.fish b/tests/checks/output-buffering.fish index 552808013..603b428f1 100644 --- a/tests/checks/output-buffering.fish +++ b/tests/checks/output-buffering.fish @@ -16,7 +16,7 @@ end run-concurrently ' set t "$( - /bin/echo -n A + command echo -n A echo -n B )" test $t = AB @@ -25,7 +25,7 @@ run-concurrently ' run-concurrently ' eval " - /bin/echo -n C + command echo -n C echo -n D " | read -l t test $t = CD @@ -35,7 +35,7 @@ run-concurrently ' run-concurrently ' # block/function node output is buffered also begin - /bin/echo -n E + command echo -n E echo -n F end | read -l t diff --git a/tests/checks/redirect.fish b/tests/checks/redirect.fish index e961b4d07..8efebdb0b 100644 --- a/tests/checks/redirect.fish +++ b/tests/checks/redirect.fish @@ -118,16 +118,16 @@ echo hooray2 >&2 # This code is very similar to eval. We go over a bunch of fads # to make it likely that we will nominally conflict with a pipe # fish is supposed to detect this case and dup the pipe to something else -echo "/bin/echo pipe 3 <&3 3<&-" | source 3<&0 -echo "/bin/echo pipe 4 <&4 4<&-" | source 4<&0 -echo "/bin/echo pipe 5 <&5 5<&-" | source 5<&0 -echo "/bin/echo pipe 6 <&6 6<&-" | source 6<&0 -echo "/bin/echo pipe 7 <&7 7<&-" | source 7<&0 -echo "/bin/echo pipe 8 <&8 8<&-" | source 8<&0 -echo "/bin/echo pipe 9 <&9 9<&-" | source 9<&0 -echo "/bin/echo pipe 10 <&10 10<&-" | source 10<&0 -echo "/bin/echo pipe 11 <&11 11<&-" | source 11<&0 -echo "/bin/echo pipe 12 <&12 12<&-" | source 12<&0 +echo "command echo pipe 3 <&3 3<&-" | source 3<&0 +echo "command echo pipe 4 <&4 4<&-" | source 4<&0 +echo "command echo pipe 5 <&5 5<&-" | source 5<&0 +echo "command echo pipe 6 <&6 6<&-" | source 6<&0 +echo "command echo pipe 7 <&7 7<&-" | source 7<&0 +echo "command echo pipe 8 <&8 8<&-" | source 8<&0 +echo "command echo pipe 9 <&9 9<&-" | source 9<&0 +echo "command echo pipe 10 <&10 10<&-" | source 10<&0 +echo "command echo pipe 11 <&11 11<&-" | source 11<&0 +echo "command echo pipe 12 <&12 12<&-" | source 12<&0 #CHECK: pipe 3 #CHECK: pipe 4 #CHECK: pipe 5 diff --git a/tests/pexpects/exit_handlers.py b/tests/pexpects/exit_handlers.py index 8959cc2ab..fdf12aaf2 100644 --- a/tests/pexpects/exit_handlers.py +++ b/tests/pexpects/exit_handlers.py @@ -10,7 +10,7 @@ with tempfile.NamedTemporaryFile(mode="r", encoding="utf8") as tf: fish_pid = sp.spawn.pid sp.expect_prompt() sp.sendline( - "function myexit --on-event fish_exit; /bin/echo $fish_pid > {filename}; end".format( + "function myexit --on-event fish_exit; command echo $fish_pid > {filename}; end".format( filename=tf.name ) ) diff --git a/tests/pexpects/pipeline.py b/tests/pexpects/pipeline.py index 10a99afa2..cedeb3511 100644 --- a/tests/pexpects/pipeline.py +++ b/tests/pexpects/pipeline.py @@ -11,7 +11,7 @@ send, sendline, expect_prompt, expect_str = ( ) expect_prompt() -sendline("function echo_wrap ; /bin/echo $argv ; sleep 0.1; end") +sendline("function echo_wrap ; command echo $argv ; sleep 0.1; end") expect_prompt() if not os.environ.get("fish_test_helper", ""):