Skip to content

Commit

Permalink
c: Add test to make sure env variables are initialized correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
chvp committed Jul 3, 2023
1 parent 1ff0e8f commit 32dd058
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/extra/language.c.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,20 @@
# Has a C compiler
type -p clang
'';
# Test good LD_LIBRARY_PATH value
language-c-2 =
let
shell = devshell.mkShell {
imports = [ ../../extra/language/c.nix ];
devshell.name = "devshell-2";
language.c.libraries = [ pkgs.openssl ];
};
in
runTest "language-c-2" { } ''
# Load the devshell
source ${shell}/env.bash
# LD_LIBRARY_PATH is evaluated correctly
[[ ! "$LD_LIBRARY_PATH" =~ "DEVSHELL_DIR" ]]
'';
}

0 comments on commit 32dd058

Please sign in to comment.