diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-07-09 01:17:32 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-07-09 01:18:44 +0200 |
commit | e50408bd3192156e04571a1546d053f998ab4e2c (patch) | |
tree | 05f6581cbabdbc1d7da7cbcc7ede40662710706c /tests | |
parent | 9fc7da1e08d83378f8b0d66a060d92929c1468cf (diff) |
nix develop: Add a test for bash functions
Diffstat (limited to 'tests')
-rw-r--r-- | tests/nix-shell.sh | 1 | ||||
-rw-r--r-- | tests/shell.nix | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/nix-shell.sh b/tests/nix-shell.sh index 728313a8a..ec43db349 100644 --- a/tests/nix-shell.sh +++ b/tests/nix-shell.sh @@ -101,3 +101,4 @@ source <(nix print-dev-env -f shell.nix shellDrv) [[ ${arr1[2]} = "3 4" ]] [[ ${arr2[1]} = $'\n' ]] [[ ${arr2[2]} = $'x\ny' ]] +[[ $(fun) = blabla ]] diff --git a/tests/shell.nix b/tests/shell.nix index 1f5526253..70c60276c 100644 --- a/tests/shell.nix +++ b/tests/shell.nix @@ -22,6 +22,9 @@ let pkgs = rec { done declare -a arr1=(1 2 "3 4" 5) declare -a arr2=(x $'\n' $'x\ny') + fun() { + echo blabla + } ''; stdenv = mkDerivation { |