@@ -8,7 +8,7 @@ function assert_directory_exists() {
88 test_fn=" $( bashunit::helper::find_test_function_name) "
99 local label=" ${2:- $(bashunit:: helper:: normalize_test_function_name " $test_fn " )} "
1010
11- if [[ ! -d " $expected " ] ]; then
11+ if [ ! -d " $expected " ]; then
1212 bashunit::assert::mark_failed
1313 bashunit::console_results::print_failed_test " ${label} " " ${expected} " " to exist but" " do not exist"
1414 return
@@ -25,7 +25,7 @@ function assert_directory_not_exists() {
2525 test_fn=" $( bashunit::helper::find_test_function_name) "
2626 local label=" ${2:- $(bashunit:: helper:: normalize_test_function_name " $test_fn " )} "
2727
28- if [[ -d " $expected " ] ]; then
28+ if [ -d " $expected " ]; then
2929 bashunit::assert::mark_failed
3030 bashunit::console_results::print_failed_test " ${label} " " ${expected} " " to not exist but" " the directory exists"
3131 return
@@ -42,7 +42,7 @@ function assert_is_directory() {
4242 test_fn=" $( bashunit::helper::find_test_function_name) "
4343 local label=" ${2:- $(bashunit:: helper:: normalize_test_function_name " $test_fn " )} "
4444
45- if [[ ! -d " $expected " ] ]; then
45+ if [ ! -d " $expected " ]; then
4646 bashunit::assert::mark_failed
4747 bashunit::console_results::print_failed_test " ${label} " " ${expected} " " to be a directory" " but is not a directory"
4848 return
@@ -59,7 +59,7 @@ function assert_is_directory_empty() {
5959 test_fn=" $( bashunit::helper::find_test_function_name) "
6060 local label=" ${2:- $(bashunit:: helper:: normalize_test_function_name " $test_fn " )} "
6161
62- if [[ ! -d " $expected " || -n " $( ls -A " $expected " ) " ] ]; then
62+ if [ ! -d " $expected " ] || [ -n " $( ls -A " $expected " ) " ]; then
6363 bashunit::assert::mark_failed
6464 bashunit::console_results::print_failed_test " ${label} " " ${expected} " " to be empty" " but is not empty"
6565 return
@@ -76,7 +76,7 @@ function assert_is_directory_not_empty() {
7676 test_fn=" $( bashunit::helper::find_test_function_name) "
7777 local label=" ${2:- $(bashunit:: helper:: normalize_test_function_name " $test_fn " )} "
7878
79- if [[ ! -d " $expected " || -z " $( ls -A " $expected " ) " ] ]; then
79+ if [ ! -d " $expected " ] || [ -z " $( ls -A " $expected " ) " ]; then
8080 bashunit::assert::mark_failed
8181 bashunit::console_results::print_failed_test " ${label} " " ${expected} " " to not be empty" " but is empty"
8282 return
@@ -93,7 +93,7 @@ function assert_is_directory_readable() {
9393 test_fn=" $( bashunit::helper::find_test_function_name) "
9494 local label=" ${2:- $(bashunit:: helper:: normalize_test_function_name " $test_fn " )} "
9595
96- if [[ ! -d " $expected " || ! -r " $expected " || ! -x " $expected " ] ]; then
96+ if [ ! -d " $expected " ] || [ ! -r " $expected " ] || [ ! -x " $expected " ]; then
9797 bashunit::assert::mark_failed
9898 bashunit::console_results::print_failed_test " ${label} " " ${expected} " " to be readable" " but is not readable"
9999 return
@@ -110,7 +110,7 @@ function assert_is_directory_not_readable() {
110110 test_fn=" $( bashunit::helper::find_test_function_name) "
111111 local label=" ${2:- $(bashunit:: helper:: normalize_test_function_name " $test_fn " )} "
112112
113- if [[ ! -d " $expected " ]] || [[ -r " $expected " && -x " $expected " ]] ; then
113+ if [ ! -d " $expected " ] || { [ -r " $expected " ] && [ -x " $expected " ]; } ; then
114114 bashunit::assert::mark_failed
115115 bashunit::console_results::print_failed_test " ${label} " " ${expected} " " to be not readable" " but is readable"
116116 return
@@ -127,7 +127,7 @@ function assert_is_directory_writable() {
127127 test_fn=" $( bashunit::helper::find_test_function_name) "
128128 local label=" ${2:- $(bashunit:: helper:: normalize_test_function_name " $test_fn " )} "
129129
130- if [[ ! -d " $expected " || ! -w " $expected " ] ]; then
130+ if [ ! -d " $expected " ] || [ ! -w " $expected " ]; then
131131 bashunit::assert::mark_failed
132132 bashunit::console_results::print_failed_test " ${label} " " ${expected} " " to be writable" " but is not writable"
133133 return
@@ -144,7 +144,7 @@ function assert_is_directory_not_writable() {
144144 test_fn=" $( bashunit::helper::find_test_function_name) "
145145 local label=" ${2:- $(bashunit:: helper:: normalize_test_function_name " $test_fn " )} "
146146
147- if [[ ! -d " $expected " || -w " $expected " ] ]; then
147+ if [ ! -d " $expected " ] || [ -w " $expected " ]; then
148148 bashunit::assert::mark_failed
149149 bashunit::console_results::print_failed_test " ${label} " " ${expected} " " to be not writable" " but is writable"
150150 return
0 commit comments