From b8dc5a7f6d52df98a546ad3b39104f4b8e7b8daf Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 20 Jun 2019 11:13:05 +0100 Subject: 44435: Handling digita arguments for :h and :t. Pick number of leading or trailing path components to substitute. Active in history, brace parameters, glob qualifiers. Add tests for all three environments. --- Test/D02glob.ztst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'Test/D02glob.ztst') diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst index 08b71dc8e..5638e1255 100644 --- a/Test/D02glob.ztst +++ b/Test/D02glob.ztst @@ -700,3 +700,31 @@ print ${value//[${foo}b-z]/x} 0:handling of - range in complicated pattern context >xx + + pathtotest=glob.tmp/my/test/dir/that/does/not/exist + mkdir -p $pathtotest + print $pathtotest(:h) + print $pathtotest(:h0) + print $pathtotest(:h10) + print $pathtotest(:h3) + print $pathtotest(:h2) + print $pathtotest(:h1) + print $pathtotest(:t) + print $pathtotest(:t0) + print $pathtotest(:t10) + print $pathtotest(:t3) + print $pathtotest(:t2) + print $pathtotest(:t1) +0:modifiers :h and :t with numbers (main test is in D04parameter.ztst) +>glob.tmp/my/test/dir/that/does/not +>glob.tmp/my/test/dir/that/does/not +>glob.tmp/my/test/dir/that/does/not/exist +>glob.tmp/my/test +>glob.tmp/my +>glob.tmp +>exist +>exist +>glob.tmp/my/test/dir/that/does/not/exist +>does/not/exist +>not/exist +>exist -- cgit 1.4.1