about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorDan Peebles <pumpkingod@gmail.com>2015-04-20T04·34-0400
committerDan Peebles <pumpkingod@gmail.com>2015-04-20T04·34-0400
commit8a84bd8c8bda1e4c6764c10ecdef9d74e4884800 (patch)
treea901eb32c7b6661f6915e021e045f22e2307e856 /tests
parent4d652875bdd87c3f1aa08111c63c0719f1ee0c1a (diff)
Support tarballs in nix channel URLs
Diffstat (limited to 'tests')
-rw-r--r--tests/nix-channel.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/nix-channel.sh b/tests/nix-channel.sh
index a25d56bec11e..0114566d784c 100644
--- a/tests/nix-channel.sh
+++ b/tests/nix-channel.sh
@@ -41,3 +41,26 @@ grep -q 'item.*attrPath="foo".*name="dependencies"' $TEST_ROOT/meta.xml
 # Do an install.
 nix-env -i dependencies
 [ -e $TEST_ROOT/var/nix/profiles/default/foobar ]
+
+
+
+clearProfiles
+clearManifests
+rm -f $TEST_ROOT/.nix-channels
+
+# Test updating from a tarball
+nix-channel --add file://$TEST_ROOT/foo/nixexprs.tar.bz2
+nix-channel --update
+
+# Do a query.
+nix-env -qa \* --meta --xml --out-path > $TEST_ROOT/meta.xml
+if [ "$xmllint" != false ]; then
+    $xmllint --noout $TEST_ROOT/meta.xml || fail "malformed XML"
+fi
+grep -q 'meta.*description.*Random test package' $TEST_ROOT/meta.xml
+grep -q 'item.*attrPath="foo".*name="dependencies"' $TEST_ROOT/meta.xml
+
+# Do an install.
+nix-env -i dependencies
+[ -e $TEST_ROOT/var/nix/profiles/default/foobar ]
+