mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
Add a test for multiple outputs
This currently fails. Yay test-driven development!
This commit is contained in:
parent
c172d16b00
commit
8f28a3ba25
5 changed files with 54 additions and 1 deletions
23
tests/multiple-outputs.nix
Normal file
23
tests/multiple-outputs.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
with import ./config.nix;
|
||||
|
||||
let
|
||||
|
||||
a = mkDerivation {
|
||||
name = "multiple-outputs-a";
|
||||
outputs = [ "first" "second" ];
|
||||
builder = ./multiple-outputs.a.builder.sh;
|
||||
helloString = "Hello, world!";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
assert a.second.helloString == "Hello, world!";
|
||||
|
||||
mkDerivation {
|
||||
defaultOutput = a;
|
||||
firstOutput = a.first.first;
|
||||
secondOutput = a.second.first.first.second.second.first.second;
|
||||
allOutputs = a.all;
|
||||
name = "multiple-outputs-b";
|
||||
builder = ./multiple-outputs.b.builder.sh;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue