summaryrefslogtreecommitdiff
path: root/test/librechroot-test.sh
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-02-02 22:24:28 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-02-02 22:24:28 -0500
commit6fb2295a25ee4a24b38f4fce1b652a60cedd1b64 (patch)
tree4eef41fc33185611f67232fb28089180c496caeb /test/librechroot-test.sh
parentef7a330eae68da2f47c617502b28a2f8c9eeb792 (diff)
test: `! true` doesn't trip `set -e`, do subshell magic
Diffstat (limited to 'test/librechroot-test.sh')
-rw-r--r--test/librechroot-test.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/librechroot-test.sh b/test/librechroot-test.sh
index 3896005..c22ac58 100644
--- a/test/librechroot-test.sh
+++ b/test/librechroot-test.sh
@@ -54,22 +54,22 @@ it_disables_networking_when_requested() {
require network sudo || return 0
libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty
- testsudo librechroot -l "$roundup_test_name" run curl https://repo.parabolagnulinux.org/ >/dev/null
- ! testsudo librechroot -l "$roundup_test_name" -N run curl https://repo.parabolagnulinux.org/ >/dev/null
+ testsudo librechroot -l "$roundup_test_name" run curl https://repo.parabolagnulinux.org/ >/dev/null
+ not testsudo librechroot -l "$roundup_test_name" -N run curl https://repo.parabolagnulinux.org/ >/dev/null
}
it_handles_CHROOTEXTRAPKG_correctly() {
requuire network sudo || return 0
libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty
- ! testsudo librechroot -l "$roundup_test_name" run lsof
+ not testsudo librechroot -l "$roundup_test_name" run lsof
echo "CHROOTEXTRAPKG=(lsof)" >> "$XDG_CONFIG_HOME"/libretools/chroot.conf
testsudo librechroot -l "$roundup_test_name" install-name lsof
testsudo librechroot -l "$roundup_test_name" clean-pkgs
testsudo librechroot -l "$roundup_test_name" run lsof
echo "CHROOTEXTRAPKG=()" >> "$XDG_CONFIG_HOME"/libretools/chroot.conf
testsudo librechroot -l "$roundup_test_name" clean-pkgs
- ! testsudo librechroot -l "$roundup_test_name" run lsof
+ not testsudo librechroot -l "$roundup_test_name" run lsof
}
it_displays_help_as_normal_user() {
@@ -85,7 +85,7 @@ it_otherwise_fails_as_normal_user() {
[[ $stat != 0 ]]
empty $tmpdir/stdout
- ! empty $tmpdir/stderr
+ not empty $tmpdir/stderr
}
it_displays_help_and_fails_with_0_args() {
@@ -103,7 +103,7 @@ it_fails_for_unknown_commands() {
[[ $stat != 0 ]]
empty $tmpdir/stdout
- ! empty $tmpdir/stderr
+ not empty $tmpdir/stderr
}
# requires sudo so we know it's not failing because it needs root
@@ -113,5 +113,5 @@ it_fails_for_unknown_flags() {
[[ $stat != 0 ]]
empty $tmpdir/stdout
- ! empty $tmpdir/stderr
+ not empty $tmpdir/stderr
}