gnu: Add ruby-email-reply-trimmer.
[jackhill/guix/guix.git] / tests / guix-package-aliases.sh
index 5c68664..311838b 100644 (file)
@@ -1,5 +1,5 @@
 # GNU Guix --- Functional package management for GNU
-# Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 #
 # This file is part of GNU Guix.
 #
@@ -36,25 +36,39 @@ guix install --bootstrap guile-bootstrap -p "$profile"
 test -x "$profile/bin/guile"
 
 # Make sure '-r' isn't passed as-is to 'guix package'.
-if guix install -r guile-bootstrap -p "$profile" --bootstrap
-then false; else true; fi
+! guix install -r guile-bootstrap -p "$profile" --bootstrap
 test -x "$profile/bin/guile"
 
+# Use a package transformation option and make sure it's recorded.
+guix install --bootstrap guile-bootstrap -p "$profile" \
+     --with-input=libreoffice=inkscape
+test -x "$profile/bin/guile"
+grep "libreoffice=inkscape" "$profile/manifest"
+
 guix upgrade --version
 guix upgrade -n
 guix upgrade gui.e -n
-if guix upgrade foo bar -n;
-then false; else true; fi
+! guix upgrade foo bar -n;
 
 guix remove --version
 guix remove --bootstrap guile-bootstrap -p "$profile"
 ! test -x "$profile/bin/guile"
 test `guix package -p "$profile" -I | wc -l` -eq 0
 
-if guix remove -p "$profile" this-is-not-installed --bootstrap
-then false; else true; fi
+! guix remove -p "$profile" this-is-not-installed --bootstrap
 
-if guix remove -i guile-bootstrap -p "$profile" --bootstrap
-then false; else true; fi
+! guix remove -i guile-bootstrap -p "$profile" --bootstrap
 
 guix search '\<board\>' game | grep '^name: gnubg'
+
+guix show --version
+guix show guile
+guix show python@3 | grep "^name: python"
+
+# "python@2" exists but is deprecated; make sure it doesn't show up.
+! guix show python@2
+
+# Specifying multiple packages.
+output="`guix show sed grep | grep ^name:`"
+test "$output" = "name: sed
+name: grep"