mirror of
https://github.com/torarnv/sparsebundlefs.git
synced 2026-03-03 18:28:07 +01:00
Convert tests indentation to spaces
This commit is contained in:
@@ -1,36 +1,36 @@
|
||||
|
||||
function setup() {
|
||||
mount_dir=$(mktemp -d)
|
||||
$SPARSEBUNDLEFS -s -f -D $TEST_BUNDLE $mount_dir &
|
||||
for i in {0..50}; do
|
||||
# FIXME: Find actual mount callback in fuse?
|
||||
grep -q "bundle has" $test_output_file && break || sleep 0.1
|
||||
done
|
||||
pid=$!
|
||||
dmg_file=$mount_dir/sparsebundle.dmg
|
||||
mount_dir=$(mktemp -d)
|
||||
$SPARSEBUNDLEFS -s -f -D $TEST_BUNDLE $mount_dir &
|
||||
for i in {0..50}; do
|
||||
# FIXME: Find actual mount callback in fuse?
|
||||
grep -q "bundle has" $test_output_file && break || sleep 0.1
|
||||
done
|
||||
pid=$!
|
||||
dmg_file=$mount_dir/sparsebundle.dmg
|
||||
}
|
||||
|
||||
function test_dmg_exists_after_mounting() {
|
||||
ls -al $mount_dir
|
||||
test -f $dmg_file
|
||||
ls -al $mount_dir
|
||||
test -f $dmg_file
|
||||
}
|
||||
|
||||
function test_dmg_has_expected_size() {
|
||||
size=$(ls -dn $dmg_file | awk '{print $5; exit}')
|
||||
test $size -eq 1099511627776
|
||||
size=$(ls -dn $dmg_file | awk '{print $5; exit}')
|
||||
test $size -eq 1099511627776
|
||||
}
|
||||
|
||||
function test_dmg_has_correct_owner() {
|
||||
owner=$(ls -l $dmg_file | awk '{print $3; exit}')
|
||||
test $owner = $(whoami)
|
||||
owner=$(ls -l $dmg_file | awk '{print $3; exit}')
|
||||
test $owner = $(whoami)
|
||||
}
|
||||
|
||||
function test_dmg_has_correct_permissions() {
|
||||
permissions=$(ls -l $dmg_file | awk '{print $1; exit}')
|
||||
test $permissions = "-r--------"
|
||||
permissions=$(ls -l $dmg_file | awk '{print $1; exit}')
|
||||
test $permissions = "-r--------"
|
||||
}
|
||||
|
||||
function teardown() {
|
||||
umount $mount_dir
|
||||
rm -Rf $mount_dir
|
||||
umount $mount_dir
|
||||
rm -Rf $mount_dir
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
|
||||
function setup() {
|
||||
mount_dir=$(mktemp -d)
|
||||
$SPARSEBUNDLEFS -s -f -D -o allow_other $TEST_BUNDLE $mount_dir &
|
||||
for i in {0..50}; do
|
||||
# FIXME: Find actual mount callback in fuse?
|
||||
grep -q "bundle has" $test_output_file && break || sleep 0.1
|
||||
done
|
||||
pid=$!
|
||||
dmg_file=$mount_dir/sparsebundle.dmg
|
||||
mount_dir=$(mktemp -d)
|
||||
$SPARSEBUNDLEFS -s -f -D -o allow_other $TEST_BUNDLE $mount_dir &
|
||||
for i in {0..50}; do
|
||||
# FIXME: Find actual mount callback in fuse?
|
||||
grep -q "bundle has" $test_output_file && break || sleep 0.1
|
||||
done
|
||||
pid=$!
|
||||
dmg_file=$mount_dir/sparsebundle.dmg
|
||||
}
|
||||
|
||||
function test_dmg_has_correct_permissions() {
|
||||
permissions=$(ls -l $dmg_file | awk '{print $1; exit}')
|
||||
test $permissions = "-r-----r--"
|
||||
permissions=$(ls -l $dmg_file | awk '{print $1; exit}')
|
||||
test $permissions = "-r-----r--"
|
||||
}
|
||||
|
||||
function teardown() {
|
||||
umount $mount_dir
|
||||
rm -Rf $mount_dir
|
||||
umount $mount_dir
|
||||
rm -Rf $mount_dir
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user