From 66eea6d40b7fd2c12b297f7ce55a62e02f4db291 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 1 Dec 2016 22:26:06 +0300 Subject: Make use of casts and canonicalizations in testscripts --- tests/test/script/builtin/rm.test | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'tests/test/script/builtin/rm.test') diff --git a/tests/test/script/builtin/rm.test b/tests/test/script/builtin/rm.test index 31dfca0..bb12827 100644 --- a/tests/test/script/builtin/rm.test +++ b/tests/test/script/builtin/rm.test @@ -2,11 +2,7 @@ # copyright : Copyright (c) 2014-2016 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -+if ($cxx.target.class != windows) # @@ TMP trailing separator - s = '/' -else - s = '\' -end +td = $~ : no-args : @@ -63,19 +59,19 @@ rm -r a : : Removing scope directory fails. : -rm -r ./ 2>"rm: '$~$s' contains scope working directory" == 1 +rm -r ./ 2>"rm: '([string] $~)' contains test working directory '$~'" == 1 : outside-scope : -: Removing path outside the script working directory fails. Need to use a path -: that unlikely exists (not to remove something useful). +: Removing path outside the testscript working directory fails. Need to use a +: path that unlikely exists (not to remove something useful). : : -rm ../../a/b/c 2>"rm: '$normalize([path] $~/../../a/b/c)' is outside script working directory" == 1 +rm ../../a/b/c 2>"rm: '$normalize([path] $~/../../a/b/c)' is out of working directory '$td'" == 1 : outside-scope-force : -: Removing path outside the script scope working directory succeeds with -f +: Removing path outside the testscript working directory succeeds with -f : option. Need to use a path that unlikely exists (not to remove something : useful). : -- cgit v1.1