mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-29 12:35:15 +02:00
tests: Simplify shell exit status negation;
* tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-environment.sh, tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix-graph.sh, tests/guix-hash.sh, tests/guix-lint.sh, tests/guix-pack-relocatable.sh, tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix-package-net.sh, tests/guix-package.sh: Use the shell '!' keyword to negate command exit status in place of 'if ...; then false; else true; fi'
This commit is contained in:
@@ -36,26 +36,22 @@ 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"
|
||||
|
||||
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'
|
||||
|
||||
@@ -64,7 +60,7 @@ guix show guile
|
||||
guix show python@3 | grep "^name: python"
|
||||
|
||||
# "python@2" exists but is deprecated; make sure it doesn't show up.
|
||||
if guix show python@2; then false; else true; fi
|
||||
! guix show python@2
|
||||
|
||||
# Specifying multiple packages.
|
||||
output="`guix show sed grep | grep ^name:`"
|
||||
|
||||
Reference in New Issue
Block a user