nix develop: Add a test for bash functions

This commit is contained in:
Eelco Dolstra 2021-07-09 01:17:32 +02:00
parent 9fc7da1e08
commit e50408bd31
2 changed files with 4 additions and 0 deletions

View file

@ -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 ]]

View file

@ -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 {