summaryrefslogtreecommitdiff
path: root/test/libremakepkg-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/libremakepkg-test.sh')
-rw-r--r--test/libremakepkg-test.sh21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/libremakepkg-test.sh b/test/libremakepkg-test.sh
index 6fa7962..0d24b43 100644
--- a/test/libremakepkg-test.sh
+++ b/test/libremakepkg-test.sh
@@ -16,13 +16,15 @@ it_builds_a_trivial_package() {
[[ -f $(echo libretools-hello-1.0-1-any.pkg.tar.?z) ]]
}
-it_enables_networking_during_prepare() {
+it_disables_networking_during_prepare() {
require network sudo || return 0
cp libremakepkg.d/PKGBUILD-netprepare "$tmpdir/PKGBUILD"
cd "$tmpdir"
libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty
- testsudo libremakepkg -l "$roundup_test_name"
+ not testsudo libremakepkg -l "$roundup_test_name"
+ not [[ -f $(echo libretools-netprepare-1.0-1-any.pkg.tar.?z) ]]
+ testsudo libremakepkg -l "$roundup_test_name" -N
[[ -f $(echo libretools-netprepare-1.0-1-any.pkg.tar.?z) ]]
}
@@ -203,3 +205,18 @@ it_fails_with_bad_signatures() {
libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty
not testsudo libremakepkg -l "$roundup_test_name"
}
+
+it_does_not_run_pkgver() {
+ require network sudo || return 0
+
+ cp libremakepkg.d/PKGBUILD-pkgver "$tmpdir/PKGBUILD"
+ pushd "$tmpdir"
+
+ libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty
+ testsudo libremakepkg -l "$roundup_test_name"
+
+ [[ -f $(echo libretools-pkgver-1-1-any.pkg.tar.?z) ]]
+ not [[ -f $(echo libretools-pkgver-2-1-any.pkg.tar.?z) ]]
+ popd
+ diff -u libremakepkg.d/PKGBUILD-pkgver "$tmpdir/PKGBUILD"
+}