diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-03-14 18:20:31 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-04-04 22:58:03 +0200 |
commit | f54f2aa9df5047b348ca104f5145af50c1a482f6 (patch) | |
tree | 0cba8a8b405861fdabaefa4eba5276c47247599d /tests | |
parent | 4b451813f7c5677086772e29a66a8265ec0ca2c7 (diff) | |
download | guix-f54f2aa9df5047b348ca104f5145af50c1a482f6.tar.gz |
packages: Add 'package-unique-version-prefix'.
* gnu/packages.scm (package-unique-version-prefix): New procedure. * guix/scripts/package.scm (manifest-entry-version-prefix): Use it. * tests/packages.scm ("package-unique-version-prefix, gcc@8") ("package-unique-version-prefix, grep"): New tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/packages.scm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm index 710eace6dc..6cbc34ba0b 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -1923,6 +1923,19 @@ (package-location (specification->package "guile@2")) (specification->location "guile@2")) +(test-equal "package-unique-version-prefix, gcc@8" + "8" + (let ((gcc (specification->package "gcc-toolchain@8"))) + (package-unique-version-prefix (package-name gcc) + (package-version gcc)))) + +(test-equal "package-unique-version-prefix, grep" + "" + (let ((grep (specification->package "grep"))) + (package-unique-version-prefix (package-name grep) + (package-version grep)))) + + (test-eq "this-package-input, exists" hello (package-arguments |