From 6fb2295a25ee4a24b38f4fce1b652a60cedd1b64 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Feb 2014 22:24:28 -0500 Subject: test: `! true` doesn't trip `set -e`, do subshell magic --- test/libremakepkg-test.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/libremakepkg-test.sh') diff --git a/test/libremakepkg-test.sh b/test/libremakepkg-test.sh index 06cf695..811c8ed 100644 --- a/test/libremakepkg-test.sh +++ b/test/libremakepkg-test.sh @@ -40,8 +40,8 @@ it_disables_networking_during_build() { cd "$tmpdir" libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty - ! testsudo libremakepkg -l "$roundup_test_name" - ! [[ -f $(echo libretools-netbuild-1.0-1-any.pkg.tar.?z) ]] + not testsudo libremakepkg -l "$roundup_test_name" + not [[ -f $(echo libretools-netbuild-1.0-1-any.pkg.tar.?z) ]] testsudo libremakepkg -l "$roundup_test_name" -N [[ -f $(echo libretools-netbuild-1.0-1-any.pkg.tar.?z) ]] } @@ -52,8 +52,8 @@ it_disables_networking_during_package() { cd "$tmpdir" libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty - ! testsudo libremakepkg -l "$roundup_test_name" - ! [[ -f $(echo libretools-netpackage-1.0-1-any.pkg.tar.?z) ]] + not testsudo libremakepkg -l "$roundup_test_name" + not [[ -f $(echo libretools-netpackage-1.0-1-any.pkg.tar.?z) ]] testsudo libremakepkg -l "$roundup_test_name" -N [[ -f $(echo libretools-netpackage-1.0-1-any.pkg.tar.?z) ]] } @@ -83,7 +83,7 @@ it_cleans_the_chroot_before_building() { testsudo librechroot -l "$roundup_test_name" run libretools-testpkg1 'first time, pass' cd "$tmpdir/3" testsudo libremakepkg -l "$roundup_test_name" &> "$tmpdir/out" || { r=$?; tail "$tmpdir/out"|cat -v; return $r; } - ! testsudo librechroot -l "$roundup_test_name" run libretools-testpkg1 'second time, fail' + not testsudo librechroot -l "$roundup_test_name" run libretools-testpkg1 'second time, fail' } it_handles_PKGDEST_not_existing() { @@ -114,5 +114,5 @@ it_otherwise_fails_as_normal_user() { [[ $stat != 0 ]] empty $tmpdir/stdout - ! empty $tmpdir/stderr + not empty $tmpdir/stderr } -- cgit v1.2.3-54-g00ecf