summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-01-22 22:13:10 +0100
committerLudovic Courtès <ludo@gnu.org>2013-01-22 22:14:25 +0100
commit5401dd7595f558e759c82b1dede0c2fb687f296b (patch)
tree0b04aa9805bc61d9e01676a634bf4572237e6cc2 /tests
parent476f8ea33ce3791dbe0c77332c92e4351827dcd5 (diff)
guix-build: Allow version-qualified package names.
* guix-build.in (guix-build)[find-package]: New procedure. Use it instead of using `find-packages-by-name' directly. Suggested by Andreas Enge <andreas@enge.fr>. * tests/guix-build.sh: Add tests. * doc/guix.texi (Invoking guix-build): Add `coreutils-8.20' as an example. Fix guile-1.8 example.
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-build.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/guix-build.sh b/tests/guix-build.sh
index fccf2168b1..5718b07d0c 100644
--- a/tests/guix-build.sh
+++ b/tests/guix-build.sh
@@ -1,5 +1,5 @@
# GNU Guix --- Functional package management for GNU
-# Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of GNU Guix.
#
@@ -50,3 +50,11 @@ if guix-build -r "$result" -e '(@@ (gnu packages base) %bootstrap-guile)'
then false; else true; fi
rm -f "$result"
+
+# Parsing package names and versions.
+guix-build -n time # PASS
+guix-build -n time-1.7 # PASS, version found
+if guix-build -n time-3.2; # FAIL, version not found
+then false; else true; fi
+if guix-build -n something-that-will-never-exist; # FAIL
+then false; else true; fi