# file : tests/test/script/builtin/rm.testscript # license : MIT; see accompanying LICENSE file .include ../common.testscript : dir : { : scope : : Removing scope directory fails. : $c <"rm: '$~' contains test working directory '$~'" == 1 EOI } : path : { : outside-scope : : Need to use a path that unlikely exists (not to remove something useful). : { : fail : : Removing path outside the testscript working directory fails. : $c <>/~%EOE% == 1 %rm: '.+/path/outside-scope/fail/a/b/c' is out of working directory '.+/path/outside-scope/fail/test'% EOE EOI : force : : Removing path outside the testscript working directory succeeds with -f : option. : $c <'rm -f ../../a/b/c' && $b } }