Files
bats-file-rpm/01-disable-tests-requiring-sudo.patch
T
demus bf811af8ba
Build and provide rpm of bats-file / Build src rpm and send it to COPR (f42) (release) Failing after 2m12s
Build and provide rpm of bats-file / Build src rpm and send it to COPR (f43) (release) Failing after 1m40s
Build and provide rpm of bats-file / Build src rpm and send it to COPR (f44) (release) Failing after 2m20s
Build and provide rpm of bats-file / Build src rpm and send it to COPR (rawhide) (release) Failing after 1m41s
First packaging
2026-03-22 01:22:54 +01:00

480 lines
19 KiB
Diff

diff --git a/test/54-assert-10-assert_character_exists.bats b/test/54-assert-10-assert_character_exists.bats
index c92a1a3..c4e6ac0 100644
--- a/test/54-assert-10-assert_character_exists.bats
+++ b/test/54-assert-10-assert_character_exists.bats
@@ -3,20 +3,20 @@
load 'test_helper'
fixtures 'exist'
-setup () {
- bats_sudo mknod ${TEST_FIXTURE_ROOT}/dir/test_device c 89 1
-}
+# setup () {
+# bats_sudo mknod ${TEST_FIXTURE_ROOT}/dir/test_device c 89 1
+# }
teardown () {
rm -f ${TEST_FIXTURE_ROOT}/dir/test_device
}
# Correctness
-@test 'assert_character_exists() <file>: returns 0 if <file> character special file exists' {
- local -r file="${TEST_FIXTURE_ROOT}/dir/test_device"
- run assert_character_exists "$file"
- [ "$status" -eq 0 ]
- [ "${#lines[@]}" -eq 0 ]
-}
+# @test 'assert_character_exists() <file>: returns 0 if <file> character special file exists' {
+# local -r file="${TEST_FIXTURE_ROOT}/dir/test_device"
+# run assert_character_exists "$file"
+# [ "$status" -eq 0 ]
+# [ "${#lines[@]}" -eq 0 ]
+# }
@test 'assert_character_exists() <file>: returns 1 and displays path if <file> character special file does not exist' {
local -r file="${TEST_FIXTURE_ROOT}/dir/file"
diff --git a/test/54-assert-11-assert_character_not_exists.bats b/test/54-assert-11-assert_character_not_exists.bats
index 6586a7f..6161377 100644
--- a/test/54-assert-11-assert_character_not_exists.bats
+++ b/test/54-assert-11-assert_character_not_exists.bats
@@ -3,9 +3,9 @@
load 'test_helper'
fixtures 'exist'
-setup () {
- bats_sudo mknod ${TEST_FIXTURE_ROOT}/dir/test_device c 89 1
-}
+# setup () {
+# bats_sudo mknod ${TEST_FIXTURE_ROOT}/dir/test_device c 89 1
+# }
teardown () {
rm -f ${TEST_FIXTURE_ROOT}/dir/test_device
}
@@ -18,46 +18,46 @@ teardown () {
[ "${#lines[@]}" -eq 0 ]
}
-@test 'assert_character_not_exists() <file>: returns 1 and displays path if <file> character special file exists, but it was expected to be absent' {
- local -r file="${TEST_FIXTURE_ROOT}/dir/test_device"
- run assert_character_not_exists "$file"
- [ "$status" -eq 1 ]
- [ "${#lines[@]}" -eq 3 ]
- [ "${lines[0]}" == '-- character special file exists, but it was expected to be absent --' ]
- [ "${lines[1]}" == "path : $file" ]
- [ "${lines[2]}" == '--' ]
-}
+# @test 'assert_character_not_exists() <file>: returns 1 and displays path if <file> character special file exists, but it was expected to be absent' {
+# local -r file="${TEST_FIXTURE_ROOT}/dir/test_device"
+# run assert_character_not_exists "$file"
+# [ "$status" -eq 1 ]
+# [ "${#lines[@]}" -eq 3 ]
+# [ "${lines[0]}" == '-- character special file exists, but it was expected to be absent --' ]
+# [ "${lines[1]}" == "path : $file" ]
+# [ "${lines[2]}" == '--' ]
+# }
# Transforming path
-@test 'assert_character_not_exists() <file>: replace prefix of displayed path' {
- local -r BATSLIB_FILE_PATH_REM="#${TEST_FIXTURE_ROOT}"
- local -r BATSLIB_FILE_PATH_ADD='..'
- run assert_character_not_exists "${TEST_FIXTURE_ROOT}/dir/test_device"
- [ "$status" -eq 1 ]
- [ "${#lines[@]}" -eq 3 ]
- [ "${lines[0]}" == '-- character special file exists, but it was expected to be absent --' ]
- [ "${lines[1]}" == "path : ../dir/test_device" ]
- [ "${lines[2]}" == '--' ]
-}
+# @test 'assert_character_not_exists() <file>: replace prefix of displayed path' {
+# local -r BATSLIB_FILE_PATH_REM="#${TEST_FIXTURE_ROOT}"
+# local -r BATSLIB_FILE_PATH_ADD='..'
+# run assert_character_not_exists "${TEST_FIXTURE_ROOT}/dir/test_device"
+# [ "$status" -eq 1 ]
+# [ "${#lines[@]}" -eq 3 ]
+# [ "${lines[0]}" == '-- character special file exists, but it was expected to be absent --' ]
+# [ "${lines[1]}" == "path : ../dir/test_device" ]
+# [ "${lines[2]}" == '--' ]
+# }
-@test 'assert_character_not_exists() <file>: replace suffix of displayed path' {
- local -r BATSLIB_FILE_PATH_REM='%file'
- local -r BATSLIB_FILE_PATH_ADD='..'
- run assert_character_not_exists "${TEST_FIXTURE_ROOT}/dir/test_device"
- [ "$status" -eq 1 ]
- [ "${#lines[@]}" -eq 3 ]
- [ "${lines[0]}" == '-- character special file exists, but it was expected to be absent --' ]
- [ "${lines[1]}" == "path : ${TEST_FIXTURE_ROOT}/dir/test_device" ]
- [ "${lines[2]}" == '--' ]
-}
+# @test 'assert_character_not_exists() <file>: replace suffix of displayed path' {
+# local -r BATSLIB_FILE_PATH_REM='%file'
+# local -r BATSLIB_FILE_PATH_ADD='..'
+# run assert_character_not_exists "${TEST_FIXTURE_ROOT}/dir/test_device"
+# [ "$status" -eq 1 ]
+# [ "${#lines[@]}" -eq 3 ]
+# [ "${lines[0]}" == '-- character special file exists, but it was expected to be absent --' ]
+# [ "${lines[1]}" == "path : ${TEST_FIXTURE_ROOT}/dir/test_device" ]
+# [ "${lines[2]}" == '--' ]
+# }
-@test 'assert_character_not_exists() <file>: replace infix of displayed path' {
- local -r BATSLIB_FILE_PATH_REM='dir'
- local -r BATSLIB_FILE_PATH_ADD='..'
- run assert_character_not_exists "${TEST_FIXTURE_ROOT}/dir/test_device"
- [ "$status" -eq 1 ]
- [ "${#lines[@]}" -eq 3 ]
- [ "${lines[0]}" == '-- character special file exists, but it was expected to be absent --' ]
- [ "${lines[1]}" == "path : ${TEST_FIXTURE_ROOT}/../test_device" ]
- [ "${lines[2]}" == '--' ]
-}
+# @test 'assert_character_not_exists() <file>: replace infix of displayed path' {
+# local -r BATSLIB_FILE_PATH_REM='dir'
+# local -r BATSLIB_FILE_PATH_ADD='..'
+# run assert_character_not_exists "${TEST_FIXTURE_ROOT}/dir/test_device"
+# [ "$status" -eq 1 ]
+# [ "${#lines[@]}" -eq 3 ]
+# [ "${lines[0]}" == '-- character special file exists, but it was expected to be absent --' ]
+# [ "${lines[1]}" == "path : ${TEST_FIXTURE_ROOT}/../test_device" ]
+# [ "${lines[2]}" == '--' ]
+# }
diff --git a/test/55-assert-10-assert_block_exists.bats b/test/55-assert-10-assert_block_exists.bats
index 2211a3b..49c99e6 100644
--- a/test/55-assert-10-assert_block_exists.bats
+++ b/test/55-assert-10-assert_block_exists.bats
@@ -2,20 +2,20 @@
load 'test_helper'
fixtures 'exist'
-setup () {
- bats_sudo mknod ${TEST_FIXTURE_ROOT}/dir/blockfile b 89 1
-}
+# setup () {
+# bats_sudo mknod ${TEST_FIXTURE_ROOT}/dir/blockfile b 89 1
+# }
teardown () {
rm -f ${TEST_FIXTURE_ROOT}/dir/blockfile
}
# Correctness
-@test 'assert_block_exists() <file>: returns 0 if <file> block special file exists' {
- local -r file="${TEST_FIXTURE_ROOT}/dir/blockfile"
- run assert_block_exists "$file"
- [ "$status" -eq 0 ]
- [ "${#lines[@]}" -eq 0 ]
-}
+# @test 'assert_block_exists() <file>: returns 0 if <file> block special file exists' {
+# local -r file="${TEST_FIXTURE_ROOT}/dir/blockfile"
+# run assert_block_exists "$file"
+# [ "$status" -eq 0 ]
+# [ "${#lines[@]}" -eq 0 ]
+# }
@test 'assert_block_exists() <file>: returns 1 and displays path if <file> block special file does not exist' {
local -r file="${TEST_FIXTURE_ROOT}/dir/file"
diff --git a/test/55-assert-11-assert_block_not_exists.bats b/test/55-assert-11-assert_block_not_exists.bats
index 9bff904..37fa67d 100644
--- a/test/55-assert-11-assert_block_not_exists.bats
+++ b/test/55-assert-11-assert_block_not_exists.bats
@@ -3,9 +3,9 @@
load 'test_helper'
fixtures 'exist'
-setup () {
- bats_sudo mknod ${TEST_FIXTURE_ROOT}/dir/blockfile b 89 1
-}
+# setup () {
+# bats_sudo mknod ${TEST_FIXTURE_ROOT}/dir/blockfile b 89 1
+# }
teardown () {
rm -f ${TEST_FIXTURE_ROOT}/dir/blockfile
}
@@ -18,48 +18,47 @@ teardown () {
[ "${#lines[@]}" -eq 0 ]
}
-@test 'assert_block_not_exists() <file>: returns 1 and displays path if <file> block special file exists, but it was expected to be absent' {
- local -r file="${TEST_FIXTURE_ROOT}/dir/blockfile"
- run assert_block_not_exists "$file"
- [ "$status" -eq 1 ]
- [ "${#lines[@]}" -eq 3 ]
- [ "${lines[0]}" == '-- block special file exists, but it was expected to be absent --' ]
- [ "${lines[1]}" == "path : $file" ]
- [ "${lines[2]}" == '--' ]
-}
+# @test 'assert_block_not_exists() <file>: returns 1 and displays path if <file> block special file exists, but it was expected to be absent' {
+# local -r file="${TEST_FIXTURE_ROOT}/dir/blockfile"
+# run assert_block_not_exists "$file"
+# [ "$status" -eq 1 ]
+# [ "${#lines[@]}" -eq 3 ]
+# [ "${lines[0]}" == '-- block special file exists, but it was expected to be absent --' ]
+# [ "${lines[1]}" == "path : $file" ]
+# [ "${lines[2]}" == '--' ]
+# }
# Transforming path
-@test 'assert_block_not_exists() <file>: replace prefix of displayed path' {
- local -r BATSLIB_FILE_PATH_REM="#${TEST_FIXTURE_ROOT}"
- local -r BATSLIB_FILE_PATH_ADD='..'
- run assert_block_not_exists "${TEST_FIXTURE_ROOT}/dir/blockfile"
- [ "$status" -eq 1 ]
- [ "${#lines[@]}" -eq 3 ]
- [ "${lines[0]}" == '-- block special file exists, but it was expected to be absent --' ]
- [ "${lines[1]}" == "path : ../dir/blockfile" ]
- [ "${lines[2]}" == '--' ]
-}
+# @test 'assert_block_not_exists() <file>: replace prefix of displayed path' {
+# local -r BATSLIB_FILE_PATH_REM="#${TEST_FIXTURE_ROOT}"
+# local -r BATSLIB_FILE_PATH_ADD='..'
+# run assert_block_not_exists "${TEST_FIXTURE_ROOT}/dir/blockfile"
+# [ "$status" -eq 1 ]
+# [ "${#lines[@]}" -eq 3 ]
+# [ "${lines[0]}" == '-- block special file exists, but it was expected to be absent --' ]
+# [ "${lines[1]}" == "path : ../dir/blockfile" ]
+# [ "${lines[2]}" == '--' ]
+# }
-@test 'assert_block_not_exists() <file>: replace suffix of displayed path' {
- local -r BATSLIB_FILE_PATH_REM='%blockfile'
- local -r BATSLIB_FILE_PATH_ADD='..'
- run assert_block_not_exists "${TEST_FIXTURE_ROOT}/dir/blockfile"
- [ "$status" -eq 1 ]
- [ "${#lines[@]}" -eq 3 ]
- [ "${lines[0]}" == '-- block special file exists, but it was expected to be absent --' ]
- [ "${lines[1]}" == "path : ${TEST_FIXTURE_ROOT}/dir/.." ]
- [ "${lines[2]}" == '--' ]
+# @test 'assert_block_not_exists() <file>: replace suffix of displayed path' {
+# local -r BATSLIB_FILE_PATH_REM='%blockfile'
+# local -r BATSLIB_FILE_PATH_ADD='..'
+# run assert_block_not_exists "${TEST_FIXTURE_ROOT}/dir/blockfile"
+# [ "$status" -eq 1 ]
+# [ "${#lines[@]}" -eq 3 ]
+# [ "${lines[0]}" == '-- block special file exists, but it was expected to be absent --' ]
+# [ "${lines[1]}" == "path : ${TEST_FIXTURE_ROOT}/dir/.." ]
+# [ "${lines[2]}" == '--' ]
-}
-
-@test 'assert_block_not_exists() <file>: replace infix of displayed path' {
- local -r BATSLIB_FILE_PATH_REM='dir'
- local -r BATSLIB_FILE_PATH_ADD='..'
- run assert_block_not_exists "${TEST_FIXTURE_ROOT}/dir/blockfile"
- [ "$status" -eq 1 ]
- [ "${#lines[@]}" -eq 3 ]
- [ "${lines[0]}" == '-- block special file exists, but it was expected to be absent --' ]
- [ "${lines[1]}" == "path : ${TEST_FIXTURE_ROOT}/../blockfile" ]
- [ "${lines[2]}" == '--' ]
-}
+# }
+# @test 'assert_block_not_exists() <file>: replace infix of displayed path' {
+# local -r BATSLIB_FILE_PATH_REM='dir'
+# local -r BATSLIB_FILE_PATH_ADD='..'
+# run assert_block_not_exists "${TEST_FIXTURE_ROOT}/dir/blockfile"
+# [ "$status" -eq 1 ]
+# [ "${#lines[@]}" -eq 3 ]
+# [ "${lines[0]}" == '-- block special file exists, but it was expected to be absent --' ]
+# [ "${lines[1]}" == "path : ${TEST_FIXTURE_ROOT}/../blockfile" ]
+# [ "${lines[2]}" == '--' ]
+# }
diff --git a/test/59-assert-10-assert_file_owner.bats b/test/59-assert-10-assert_file_owner.bats
index f1a2f35..2dcf061 100644
--- a/test/59-assert-10-assert_file_owner.bats
+++ b/test/59-assert-10-assert_file_owner.bats
@@ -8,24 +8,24 @@ setup () {
# There is PATH addition to /usr/sbin which won't come by default on bash3
# on macOS
chown_path=$(PATH="$PATH:/usr/sbin" command -v chown 2>/dev/null)
- bats_sudo "$chown_path" root ${TEST_FIXTURE_ROOT}/dir/owner
- bats_sudo "$chown_path" daemon ${TEST_FIXTURE_ROOT}/dir/notowner
+ # bats_sudo "$chown_path" root ${TEST_FIXTURE_ROOT}/dir/owner
+ # bats_sudo "$chown_path" daemon ${TEST_FIXTURE_ROOT}/dir/notowner
}
-teardown () {
- bats_sudo rm -f ${TEST_FIXTURE_ROOT}/dir/owner ${TEST_FIXTURE_ROOT}/dir/notowner
-}
+# teardown () {
+# bats_sudo rm -f ${TEST_FIXTURE_ROOT}/dir/owner ${TEST_FIXTURE_ROOT}/dir/notowner
+# }
# Correctness
-@test 'assert_file_owner() <file>: returns 0 if <file> user root is the owner of the file' {
- local -r owner="root"
- local -r file="${TEST_FIXTURE_ROOT}/dir/owner"
- run assert_file_owner "$owner" "$file"
- [ "$status" -eq 0 ]
- echo ${#lines[@]}
- [ "${#lines[@]}" -eq 0 ]
+# @test 'assert_file_owner() <file>: returns 0 if <file> user root is the owner of the file' {
+# local -r owner="root"
+# local -r file="${TEST_FIXTURE_ROOT}/dir/owner"
+# run assert_file_owner "$owner" "$file"
+# [ "$status" -eq 0 ]
+# echo ${#lines[@]}
+# [ "${#lines[@]}" -eq 0 ]
-}
+# }
@test 'assert_file_owner() <file>: returns 1 and displays path if <file> user root is not the owner of the file' {
local -r owner="root"
diff --git a/test/59-assert-11-assert_not_file_owner.bats b/test/59-assert-11-assert_not_file_owner.bats
index 5518941..b6e018e 100644
--- a/test/59-assert-11-assert_not_file_owner.bats
+++ b/test/59-assert-11-assert_not_file_owner.bats
@@ -8,13 +8,13 @@ setup () {
# There is PATH addition to /usr/sbin which won't come by default on bash3
# on macOS
chown_path=$(PATH="$PATH:/usr/sbin" command -v chown 2>/dev/null)
- bats_sudo "$chown_path" root ${TEST_FIXTURE_ROOT}/dir/owner
- bats_sudo "$chown_path" daemon ${TEST_FIXTURE_ROOT}/dir/notowner
+ # bats_sudo "$chown_path" root ${TEST_FIXTURE_ROOT}/dir/owner
+ # bats_sudo "$chown_path" daemon ${TEST_FIXTURE_ROOT}/dir/notowner
}
-teardown () {
- bats_sudo rm -f ${TEST_FIXTURE_ROOT}/dir/owner ${TEST_FIXTURE_ROOT}/dir/notowner
-}
+# teardown () {
+# bats_sudo rm -f ${TEST_FIXTURE_ROOT}/dir/owner ${TEST_FIXTURE_ROOT}/dir/notowner
+# }
# Correctness
@test 'assert_not_file_owner() <file>: returns 0 if <file> user is not the owner' {
@@ -25,54 +25,54 @@ teardown () {
[ "${#lines[@]}" -eq 0 ]
}
-@test 'assert_not_file_owner() <file>: returns 1 and displays path if <file> user root is the owner of the file, but it was expected not to be' {
- local -r owner="root"
- local -r file="${TEST_FIXTURE_ROOT}/dir/owner"
- run assert_not_file_owner "$owner" "$file"
- [ "$status" -eq 1 ]
- [ "${#lines[@]}" -eq 3 ]
- [ "${lines[0]}" == '-- user root is the owner of the file, but it was expected not to be --' ]
- [ "${lines[1]}" == "path : $file" ]
- [ "${lines[2]}" == '--' ]
-}
+# @test 'assert_not_file_owner() <file>: returns 1 and displays path if <file> user root is the owner of the file, but it was expected not to be' {
+# local -r owner="root"
+# local -r file="${TEST_FIXTURE_ROOT}/dir/owner"
+# run assert_not_file_owner "$owner" "$file"
+# [ "$status" -eq 1 ]
+# [ "${#lines[@]}" -eq 3 ]
+# [ "${lines[0]}" == '-- user root is the owner of the file, but it was expected not to be --' ]
+# [ "${lines[1]}" == "path : $file" ]
+# [ "${lines[2]}" == '--' ]
+# }
# Transforming path
-@test 'assert_not_file_owner() <file>: replace prefix of displayed path' {
- local -r BATSLIB_FILE_PATH_REM="#${TEST_FIXTURE_ROOT}"
- local -r BATSLIB_FILE_PATH_ADD='..'
- local -r owner="root"
- local -r file="${TEST_FIXTURE_ROOT}/dir/owner"
- run assert_not_file_owner "$owner" "$file"
- [ "$status" -eq 1 ]
- [ "${#lines[@]}" -eq 3 ]
- [ "${lines[0]}" == '-- user root is the owner of the file, but it was expected not to be --' ]
- [ "${lines[1]}" == "path : ../dir/owner" ]
- [ "${lines[2]}" == '--' ]
-}
+# @test 'assert_not_file_owner() <file>: replace prefix of displayed path' {
+# local -r BATSLIB_FILE_PATH_REM="#${TEST_FIXTURE_ROOT}"
+# local -r BATSLIB_FILE_PATH_ADD='..'
+# local -r owner="root"
+# local -r file="${TEST_FIXTURE_ROOT}/dir/owner"
+# run assert_not_file_owner "$owner" "$file"
+# [ "$status" -eq 1 ]
+# [ "${#lines[@]}" -eq 3 ]
+# [ "${lines[0]}" == '-- user root is the owner of the file, but it was expected not to be --' ]
+# [ "${lines[1]}" == "path : ../dir/owner" ]
+# [ "${lines[2]}" == '--' ]
+# }
-@test 'assert_not_file_owner() <file>: replace suffix of displayed path' {
- local -r BATSLIB_FILE_PATH_REM='%dir/owner'
- local -r BATSLIB_FILE_PATH_ADD='..'
- local -r owner="root"
- local -r file="${TEST_FIXTURE_ROOT}/dir/owner"
- run assert_not_file_owner "$owner" "$file"
- [ "$status" -eq 1 ]
- [ "${#lines[@]}" -eq 3 ]
- [ "${lines[0]}" == '-- user root is the owner of the file, but it was expected not to be --' ]
- [ "${lines[1]}" == "path : ${TEST_FIXTURE_ROOT}/.." ]
- [ "${lines[2]}" == '--' ]
-}
+# @test 'assert_not_file_owner() <file>: replace suffix of displayed path' {
+# local -r BATSLIB_FILE_PATH_REM='%dir/owner'
+# local -r BATSLIB_FILE_PATH_ADD='..'
+# local -r owner="root"
+# local -r file="${TEST_FIXTURE_ROOT}/dir/owner"
+# run assert_not_file_owner "$owner" "$file"
+# [ "$status" -eq 1 ]
+# [ "${#lines[@]}" -eq 3 ]
+# [ "${lines[0]}" == '-- user root is the owner of the file, but it was expected not to be --' ]
+# [ "${lines[1]}" == "path : ${TEST_FIXTURE_ROOT}/.." ]
+# [ "${lines[2]}" == '--' ]
+# }
-@test 'assert_not_file_owner() <file>: replace infix of displayed path' {
- local -r BATSLIB_FILE_PATH_REM='dir/owner'
- local -r BATSLIB_FILE_PATH_ADD='..'
- local -r owner="root"
- local -r file="${TEST_FIXTURE_ROOT}/dir/owner"
- run assert_not_file_owner "$owner" "$file"
- [ "$status" -eq 1 ]
- [ "${#lines[@]}" -eq 3 ]
- [ "${lines[0]}" == '-- user root is the owner of the file, but it was expected not to be --' ]
- [ "${lines[1]}" == "path : ${TEST_FIXTURE_ROOT}/.." ]
- [ "${lines[2]}" == '--' ]
-}
+# @test 'assert_not_file_owner() <file>: replace infix of displayed path' {
+# local -r BATSLIB_FILE_PATH_REM='dir/owner'
+# local -r BATSLIB_FILE_PATH_ADD='..'
+# local -r owner="root"
+# local -r file="${TEST_FIXTURE_ROOT}/dir/owner"
+# run assert_not_file_owner "$owner" "$file"
+# [ "$status" -eq 1 ]
+# [ "${#lines[@]}" -eq 3 ]
+# [ "${lines[0]}" == '-- user root is the owner of the file, but it was expected not to be --' ]
+# [ "${lines[1]}" == "path : ${TEST_FIXTURE_ROOT}/.." ]
+# [ "${lines[2]}" == '--' ]
+# }
diff --git a/test/70-temp-11-temp_del.bats b/test/70-temp-11-temp_del.bats
index 1eb9991..0eaed3a 100755
--- a/test/70-temp-11-temp_del.bats
+++ b/test/70-temp-11-temp_del.bats
@@ -14,19 +14,19 @@ fixtures 'temp'
[ ! -e "$TEST_TEMP_DIR" ]
}
-@test 'temp_del() <path>: works even if wrote-protected file/directory exists within' {
- TEST_TEMP_DIR="$(temp_make)"
- touch $TEST_TEMP_DIR/nowritefile
- chmod -w $TEST_TEMP_DIR/nowritefile
- mkdir -p $TEST_TEMP_DIR/nowritefolder
- chmod -w $TEST_TEMP_DIR/nowritefolder
-
- run temp_del "$TEST_TEMP_DIR"
-
- [ "$status" -eq 0 ]
- [ "${#lines[@]}" -eq 0 ]
- [ ! -e "$TEST_TEMP_DIR" ]
-}
+# @test 'temp_del() <path>: works even if wrote-protected file/directory exists within' {
+# TEST_TEMP_DIR="$(temp_make)"
+# touch $TEST_TEMP_DIR/nowritefile
+# chmod -w $TEST_TEMP_DIR/nowritefile
+# mkdir -p $TEST_TEMP_DIR/nowritefolder
+# chmod -w $TEST_TEMP_DIR/nowritefolder
+
+# run temp_del "$TEST_TEMP_DIR"
+
+# [ "$status" -eq 0 ]
+# [ "${#lines[@]}" -eq 0 ]
+# [ ! -e "$TEST_TEMP_DIR" ]
+# }
@test 'temp_del() <path>: returns 1 and displays an error message if <path> can not be deleted' {
local -r path="${TEST_FIXTURE_ROOT}/does/not/exist"