From 970ad5e38dd67c080ab913163bb631439318fd2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 18 Sep 2018 00:26:21 +0200 Subject: [PATCH] Move allow_other tests into main test suite --- tests/10_basic.tst | 9 +++++++++ tests/20_allow_other.tst | 16 ---------------- 2 files changed, 9 insertions(+), 16 deletions(-) delete mode 100644 tests/20_allow_other.tst diff --git a/tests/10_basic.tst b/tests/10_basic.tst index e51b11d..81777cb 100644 --- a/tests/10_basic.tst +++ b/tests/10_basic.tst @@ -21,6 +21,15 @@ function test_dmg_has_correct_permissions() { test $permissions = "-r--------" } +function test_dmg_permissions_reflect_allow_other() { + local mount_dir + local dmg_file + read -r mount_dir dmg_file < <(mount_sparsebundle -o allow_other) + permissions=$(ls -l $dmg_file | awk '{print $1; exit}') + test $permissions = "-r-----r--" + umount $mount_dir && rm -Rf $mount_dir +} + function teardown() { umount $mount_dir && rm -Rf $mount_dir } diff --git a/tests/20_allow_other.tst b/tests/20_allow_other.tst deleted file mode 100644 index 2b2fad0..0000000 --- a/tests/20_allow_other.tst +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env testrunner.sh - -source "$(dirname "$0")/testhelpers.sh" - -function setup() { - read -r mount_dir dmg_file < <(mount_sparsebundle -o allow_other) -} - -function test_dmg_has_correct_permissions() { - permissions=$(ls -l $dmg_file | awk '{print $1; exit}') - test $permissions = "-r-----r--" -} - -function teardown() { - umount $mount_dir && rm -Rf $mount_dir -}