about summary refs log tree commit diff
path: root/tests/nix-channel.sh
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2015-04-27T23·07-0400
committerShea Levy <shea@shealevy.com>2015-04-27T23·07-0400
commit96dcc006e9d2f4f37e9da05cb03c9d11383b9144 (patch)
tree929ef8e9e31bf4238e61a33684a69c8746320f58 /tests/nix-channel.sh
parent4bbcfaf87fcc3cca622f68b460015fc4741b14bc (diff)
parent8a84bd8c8bda1e4c6764c10ecdef9d74e4884800 (diff)
Merge branch 'nix-channel-tarballs' of git://github.com/copumpkin/nix
Diffstat (limited to 'tests/nix-channel.sh')
-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 ]
+