fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
1e858eae3
master
1#RUN: env FISH_PATH=%fish FILE_PATH=%s %fish %s 2 3status line-number 4# CHECK: 3 5 6# Check status fish-path 7# No output expected on success 8# 9# argv[0] on OpenBSD is just the filename, not the path 10# That means fish-path is unsupportable there. 11if not contains ( uname ) OpenBSD 12set status_fish_path( realpath ( status fish-path)) 13set env_fish_path( realpath $FISH_PATH ) 14test " $status_fish_path " = " $env_fish_path " 15or echo "Fish path disagreement: $status_fish_path vs $env_fish_path " 16end 17 18# Check is-block 19status is-block 20echo $status 21begin 22status is-block 23echo $status 24end 25# CHECK: 1 26# CHECK: 0 27 28# Check filename 29set status_filename( status filename) 30test ( status filename) = " $FILE_PATH " 31or echo "File path disagreement: $status_filename vs $FILE_PATH " 32 33function print_my_name 34status function 35end 36print_my_name 37# CHECK: print_my_name 38 39status is-command-substitution 40echo $status 41echo ( status is-command-substitution;echo $status ) 42# CHECK: 1 43# CHECK: 0 44 45test ( status filename) = ( status dirname) /( status basename) 46 47status basename 48#CHECK: status-command.fish 49 50status dirname| string match -q'*checks' 51echo $status 52#CHECK: 0 53 54echo "status dirname" | source 55#CHECK: . 56 57$FISH_PATH -c'status dirname' 58#CHECK: Standard input