fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
1e858eae3
master
1# RUN: %fish %s 2 3# Verify the correct behavior of the `setenv` compatibility shim. 4 5# No args to `setenv` should emit the current set of env vars. The first two 6# commands verify that `setenv` does not report non-env vars. 7set -g setenv1 abc 8setenv | grep '^setenv1=$' 9set -gx setenv1 xyz 10setenv | grep '^setenv1=xyz$' 11# CHECK: setenv1=xyz 12 13# A single arg should set and export the named var to nothing. 14setenv setenv2 15env | grep '^setenv2=$' 16# CHECK: setenv2= 17 18# Three or more args should be an error. 19echo too many arguments test>&2 20setenv var hello you 21# CHECKERR: too many arguments test 22# CHECKERR: setenv: Too many arguments 23 24 25# Two args should set the named var to the second arg 26setenv setenv3'hello you' 27setenv | grep '^setenv3=hello you' 28# CHECK: setenv3=hello you