aboutsummaryrefslogtreecommitdiff
path: root/tests/multiple-outputs.nix
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2011-09-14 05:59:29 +0000
committerShea Levy <shea@shealevy.com>2011-09-14 05:59:29 +0000
commit8f28a3ba25dd0dad6411a039bc01ad87c61a6e59 (patch)
tree1281600c0122c44543c8ac17a80a7bf63fe10d2c /tests/multiple-outputs.nix
parentc172d16b00dd2126eb7c4f12c26f1e30e4356f07 (diff)
Add a test for multiple outputs
This currently fails. Yay test-driven development!
Diffstat (limited to 'tests/multiple-outputs.nix')
-rw-r--r--tests/multiple-outputs.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/multiple-outputs.nix b/tests/multiple-outputs.nix
new file mode 100644
index 000000000..e8fbf91bf
--- /dev/null
+++ b/tests/multiple-outputs.nix
@@ -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;
+}