From 6e77f38b925e3f37dc69b26efd6173df7281bbe8 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 7 May 2003 09:41:56 +0000 Subject: 18508: quoting of separator in ${foo//../..} was buggy --- Test/D04parameter.ztst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Test') diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 7e70691f7..1edd168cc 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -146,6 +146,18 @@ 0:array ${...:/...} >expletive deleted boldly claws dogs expletive deleted fight + str1='a\string\with\backslashes' + str2='a/string/with/slashes' + print "${str1//\\/-}" + print ${str1//\\/-} + print "${str2//\//-}" + print ${str2//\//-} +0:use of backslashes in //-substitutions +>a-string-with-backslashes +>a-string-with-backslashes +>a-string-with-slashes +>a-string-with-slashes + str1='twocubed' array=(the number of protons in an oxygen nucleus) print $#str1 ${#str1} "$#str1 ${#str1}" $#array ${#array} "$#array ${#array}" -- cgit 1.4.1