Skip to content

Commit

Permalink
nix develop: Add a test for bash functions
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Jul 8, 2021
1 parent 9fc7da1 commit e50408b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/nix-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]]
3 changes: 3 additions & 0 deletions tests/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e50408b

Please sign in to comment.