$ prove -v rm-rf-no-file.t 
rm-rf-no-file.t .. 
Perl version:       5.026000
subdir name:        23001_base_nofile
# Creating empty subdirs
ok 1 - created 1 subdirectory
ok 2 - Directory /tmp/23001_base_nofile exists
ok 3 - Created 8 subdirectories
ok 4 - Directory /tmp/23001_base_nofile/foo_23001_0000 exists, starts life as 0775
ok 5 - Directory /tmp/23001_base_nofile/foo_23001_0100 exists, starts life as 0775
ok 6 - Directory /tmp/23001_base_nofile/foo_23001_0200 exists, starts life as 0775
ok 7 - Directory /tmp/23001_base_nofile/foo_23001_0300 exists, starts life as 0775
ok 8 - Directory /tmp/23001_base_nofile/foo_23001_0400 exists, starts life as 0775
ok 9 - Directory /tmp/23001_base_nofile/foo_23001_0500 exists, starts life as 0775
ok 10 - Directory /tmp/23001_base_nofile/foo_23001_0600 exists, starts life as 0775
ok 11 - Directory /tmp/23001_base_nofile/foo_23001_0700 exists, starts life as 0775
ok 12 - chmod /tmp/23001_base_nofile/foo_23001_0000 to 0000
ok 13 - Directory /tmp/23001_base_nofile/foo_23001_0000 changed to 0000
ok 14 - chmod /tmp/23001_base_nofile/foo_23001_0100 to 0100
ok 15 - Directory /tmp/23001_base_nofile/foo_23001_0100 changed to 0100
ok 16 - chmod /tmp/23001_base_nofile/foo_23001_0200 to 0200
ok 17 - Directory /tmp/23001_base_nofile/foo_23001_0200 changed to 0200
ok 18 - chmod /tmp/23001_base_nofile/foo_23001_0300 to 0300
ok 19 - Directory /tmp/23001_base_nofile/foo_23001_0300 changed to 0300
ok 20 - chmod /tmp/23001_base_nofile/foo_23001_0400 to 0400
ok 21 - Directory /tmp/23001_base_nofile/foo_23001_0400 changed to 0400
ok 22 - chmod /tmp/23001_base_nofile/foo_23001_0500 to 0500
ok 23 - Directory /tmp/23001_base_nofile/foo_23001_0500 changed to 0500
ok 24 - chmod /tmp/23001_base_nofile/foo_23001_0600 to 0600
ok 25 - Directory /tmp/23001_base_nofile/foo_23001_0600 changed to 0600
ok 26 - chmod /tmp/23001_base_nofile/foo_23001_0700 to 0700
ok 27 - Directory /tmp/23001_base_nofile/foo_23001_0700 changed to 0700
ok 28 - Able to rm -rf /tmp/23001_base_nofile/foo_23001_0000
ok 29 - Able to rm -rf /tmp/23001_base_nofile/foo_23001_0100
ok 30 - Able to rm -rf /tmp/23001_base_nofile/foo_23001_0200
ok 31 - Able to rm -rf /tmp/23001_base_nofile/foo_23001_0300
ok 32 - Able to rm -rf /tmp/23001_base_nofile/foo_23001_0400
ok 33 - Able to rm -rf /tmp/23001_base_nofile/foo_23001_0500
ok 34 - Able to rm -rf /tmp/23001_base_nofile/foo_23001_0600
ok 35 - Able to rm -rf /tmp/23001_base_nofile/foo_23001_0700
1..35
ok
All tests successful.
Files=1, Tests=35,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.04 cusr  0.00 csys =  0.06 CPU)
Result: PASS

$ prove -v rm-rf-with-file.t 
rm-rf-with-file.t .. 
Perl version:       5.026000
subdir name:        23012_base_with_file
# Creating subdirs with a file in each
ok 1 - created 1 subdirectory
ok 2 - Directory /tmp/23012_base_with_file exists
ok 3 - Created 8 subdirectories
ok 4 - Directory /tmp/23012_base_with_file/foo_23012_0000 exists, starts life as 0775
ok 5 - Able to create file /tmp/23012_base_with_file/foo_23012_0000/a
ok 6 - Directory /tmp/23012_base_with_file/foo_23012_0100 exists, starts life as 0775
ok 7 - Able to create file /tmp/23012_base_with_file/foo_23012_0100/a
ok 8 - Directory /tmp/23012_base_with_file/foo_23012_0200 exists, starts life as 0775
ok 9 - Able to create file /tmp/23012_base_with_file/foo_23012_0200/a
ok 10 - Directory /tmp/23012_base_with_file/foo_23012_0300 exists, starts life as 0775
ok 11 - Able to create file /tmp/23012_base_with_file/foo_23012_0300/a
ok 12 - Directory /tmp/23012_base_with_file/foo_23012_0400 exists, starts life as 0775
ok 13 - Able to create file /tmp/23012_base_with_file/foo_23012_0400/a
ok 14 - Directory /tmp/23012_base_with_file/foo_23012_0500 exists, starts life as 0775
ok 15 - Able to create file /tmp/23012_base_with_file/foo_23012_0500/a
ok 16 - Directory /tmp/23012_base_with_file/foo_23012_0600 exists, starts life as 0775
ok 17 - Able to create file /tmp/23012_base_with_file/foo_23012_0600/a
ok 18 - Directory /tmp/23012_base_with_file/foo_23012_0700 exists, starts life as 0775
ok 19 - Able to create file /tmp/23012_base_with_file/foo_23012_0700/a
ok 20 - chmod /tmp/23012_base_with_file/foo_23012_0000 to 0000
ok 21 - Directory /tmp/23012_base_with_file/foo_23012_0000 changed to 0000
ok 22 - chmod /tmp/23012_base_with_file/foo_23012_0100 to 0100
ok 23 - Directory /tmp/23012_base_with_file/foo_23012_0100 changed to 0100
ok 24 - chmod /tmp/23012_base_with_file/foo_23012_0200 to 0200
ok 25 - Directory /tmp/23012_base_with_file/foo_23012_0200 changed to 0200
ok 26 - chmod /tmp/23012_base_with_file/foo_23012_0300 to 0300
ok 27 - Directory /tmp/23012_base_with_file/foo_23012_0300 changed to 0300
ok 28 - chmod /tmp/23012_base_with_file/foo_23012_0400 to 0400
ok 29 - Directory /tmp/23012_base_with_file/foo_23012_0400 changed to 0400
ok 30 - chmod /tmp/23012_base_with_file/foo_23012_0500 to 0500
ok 31 - Directory /tmp/23012_base_with_file/foo_23012_0500 changed to 0500
ok 32 - chmod /tmp/23012_base_with_file/foo_23012_0600 to 0600
ok 33 - Directory /tmp/23012_base_with_file/foo_23012_0600 changed to 0600
ok 34 - chmod /tmp/23012_base_with_file/foo_23012_0700 to 0700
ok 35 - Directory /tmp/23012_base_with_file/foo_23012_0700 changed to 0700
rm: cannot remove '/tmp/23012_base_with_file/foo_23012_0000': Permission denied
ok 36 - Unable to rm -rf /tmp/23012_base_with_file/foo_23012_0000
rm: cannot remove '/tmp/23012_base_with_file/foo_23012_0100': Permission denied
ok 37 - Unable to rm -rf /tmp/23012_base_with_file/foo_23012_0100
rm: cannot remove '/tmp/23012_base_with_file/foo_23012_0200': Permission denied
ok 38 - Unable to rm -rf /tmp/23012_base_with_file/foo_23012_0200
rm: cannot remove '/tmp/23012_base_with_file/foo_23012_0300': Permission denied
ok 39 - Unable to rm -rf /tmp/23012_base_with_file/foo_23012_0300
rm: cannot remove '/tmp/23012_base_with_file/foo_23012_0400/a': Permission denied
ok 40 - Unable to rm -rf /tmp/23012_base_with_file/foo_23012_0400
rm: cannot remove '/tmp/23012_base_with_file/foo_23012_0500/a': Permission denied
ok 41 - Unable to rm -rf /tmp/23012_base_with_file/foo_23012_0500
rm: cannot remove '/tmp/23012_base_with_file/foo_23012_0600/a': Permission denied
ok 42 - Unable to rm -rf /tmp/23012_base_with_file/foo_23012_0600
ok 43 - Able to rm -rf /tmp/23012_base_with_file/foo_23012_0700
1..43
ok
All tests successful.
Files=1, Tests=43,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.03 cusr  0.01 csys =  0.07 CPU)
Result: PASS

