diff options
| author | Eric Bavier <bavier@member.fsf.org> | 2020-09-25 11:00:11 -0500 |
|---|---|---|
| committer | Eric Bavier <bavier@member.fsf.org> | 2020-09-28 21:06:36 -0500 |
| commit | d8934360d2453a403b5433e71d09188e4ed23b57 (patch) | |
| tree | 8f65be24496c1cc375bc675ca20e7d126f8d2ed1 /tests/guix-package-aliases.sh | |
| parent | 9380b0a0752d7b922a664e6d96899047cb2f2811 (diff) | |
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'
Diffstat (limited to 'tests/guix-package-aliases.sh')
| -rw-r--r-- | tests/guix-package-aliases.sh | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/guix-package-aliases.sh b/tests/guix-package-aliases.sh index e24bff3a560..e4ddace0573 100644 --- a/tests/guix-package-aliases.sh +++ b/tests/guix-package-aliases.sh | |||
| @@ -36,26 +36,22 @@ guix install --bootstrap guile-bootstrap -p "$profile" | |||
| 36 | test -x "$profile/bin/guile" | 36 | test -x "$profile/bin/guile" |
| 37 | 37 | ||
| 38 | # Make sure '-r' isn't passed as-is to 'guix package'. | 38 | # Make sure '-r' isn't passed as-is to 'guix package'. |
| 39 | if guix install -r guile-bootstrap -p "$profile" --bootstrap | 39 | ! guix install -r guile-bootstrap -p "$profile" --bootstrap |
| 40 | then false; else true; fi | ||
| 41 | test -x "$profile/bin/guile" | 40 | test -x "$profile/bin/guile" |
| 42 | 41 | ||
| 43 | guix upgrade --version | 42 | guix upgrade --version |
| 44 | guix upgrade -n | 43 | guix upgrade -n |
| 45 | guix upgrade gui.e -n | 44 | guix upgrade gui.e -n |
| 46 | if guix upgrade foo bar -n; | 45 | ! guix upgrade foo bar -n; |
| 47 | then false; else true; fi | ||
| 48 | 46 | ||
| 49 | guix remove --version | 47 | guix remove --version |
| 50 | guix remove --bootstrap guile-bootstrap -p "$profile" | 48 | guix remove --bootstrap guile-bootstrap -p "$profile" |
| 51 | ! test -x "$profile/bin/guile" | 49 | ! test -x "$profile/bin/guile" |
| 52 | test `guix package -p "$profile" -I | wc -l` -eq 0 | 50 | test `guix package -p "$profile" -I | wc -l` -eq 0 |
| 53 | 51 | ||
| 54 | if guix remove -p "$profile" this-is-not-installed --bootstrap | 52 | ! guix remove -p "$profile" this-is-not-installed --bootstrap |
| 55 | then false; else true; fi | ||
| 56 | 53 | ||
| 57 | if guix remove -i guile-bootstrap -p "$profile" --bootstrap | 54 | ! guix remove -i guile-bootstrap -p "$profile" --bootstrap |
| 58 | then false; else true; fi | ||
| 59 | 55 | ||
| 60 | guix search '\<board\>' game | grep '^name: gnubg' | 56 | guix search '\<board\>' game | grep '^name: gnubg' |
| 61 | 57 | ||
| @@ -64,7 +60,7 @@ guix show guile | |||
| 64 | guix show python@3 | grep "^name: python" | 60 | guix show python@3 | grep "^name: python" |
| 65 | 61 | ||
| 66 | # "python@2" exists but is deprecated; make sure it doesn't show up. | 62 | # "python@2" exists but is deprecated; make sure it doesn't show up. |
| 67 | if guix show python@2; then false; else true; fi | 63 | ! guix show python@2 |
| 68 | 64 | ||
| 69 | # Specifying multiple packages. | 65 | # Specifying multiple packages. |
| 70 | output="`guix show sed grep | grep ^name:`" | 66 | output="`guix show sed grep | grep ^name:`" |
