@@ -111,7 +111,7 @@ function test_unsuccessful_assert_is_directory_readable_when_a_file_is_given() {
111111}
112112
113113function test_unsuccessful_assert_is_directory_readable_without_execution_permission() {
114- if [[ " $_OS " == " Windows" || $_DISTRO = " Alpine" ]]; then
114+ if [[ " $EUID " -eq 0 || " $ _OS" == " Windows" || $_DISTRO = " Alpine" ]]; then
115115 return
116116 fi
117117
@@ -126,7 +126,7 @@ function test_unsuccessful_assert_is_directory_readable_without_execution_permis
126126}
127127
128128function test_unsuccessful_assert_is_directory_readable_without_read_permission() {
129- if [[ " $_OS " == " Windows" || $_DISTRO = " Alpine" ]]; then
129+ if [[ " $EUID " -eq 0 || " $ _OS" == " Windows" || $_DISTRO = " Alpine" ]]; then
130130 return
131131 fi
132132
@@ -141,7 +141,7 @@ function test_unsuccessful_assert_is_directory_readable_without_read_permission(
141141}
142142
143143function test_successful_assert_is_directory_not_readable_without_read_permission() {
144- if [[ " $_OS " == " Windows" || $_DISTRO = " Alpine" ]]; then
144+ if [[ " $EUID " -eq 0 || " $ _OS" == " Windows" || $_DISTRO = " Alpine" ]]; then
145145 return
146146 fi
147147
@@ -152,7 +152,7 @@ function test_successful_assert_is_directory_not_readable_without_read_permissio
152152}
153153
154154function test_successful_assert_is_directory_not_readable_without_execution_permission() {
155- if [[ " $_OS " == " Windows" || $_DISTRO = " Alpine" ]]; then
155+ if [[ " $EUID " -eq 0 || " $ _OS" == " Windows" || $_DISTRO = " Alpine" ]]; then
156156 return
157157 fi
158158
@@ -178,7 +178,7 @@ function test_successful_assert_is_directory_writable() {
178178}
179179
180180function test_unsuccessful_assert_is_directory_writable() {
181- if [[ " $_OS " == " Windows" || $_DISTRO = " Alpine" ]]; then
181+ if [[ " $EUID " -eq 0 || " $ _OS" == " Windows" || $_DISTRO = " Alpine" ]]; then
182182 return
183183 fi
184184
@@ -202,7 +202,7 @@ function test_unsuccessful_assert_is_directory_writable_when_a_file_is_given() {
202202}
203203
204204function test_successful_assert_is_directory_not_writable() {
205- if [[ " $_OS " == " Windows" || $_DISTRO = " Alpine" ]]; then
205+ if [[ " $EUID " -eq 0 || " $ _OS" == " Windows" || $_DISTRO = " Alpine" ]]; then
206206 return
207207 fi
208208
0 commit comments