about summary refs log tree commit diff
path: root/Test/W01history.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <p.stephenson@samsung.com>2019-06-20 11:13:05 +0100
committerPeter Stephenson <p.stephenson@samsung.com>2019-06-20 11:13:05 +0100
commitb8dc5a7f6d52df98a546ad3b39104f4b8e7b8daf (patch)
tree360211057d08021d5e1e7291e5d81d4d9ba2bf76 /Test/W01history.ztst
parent80aa807a61cf10ebf459ba8e06621a5ec33041dc (diff)
downloadzsh-b8dc5a7f6d52df98a546ad3b39104f4b8e7b8daf.tar.gz
zsh-b8dc5a7f6d52df98a546ad3b39104f4b8e7b8daf.tar.xz
zsh-b8dc5a7f6d52df98a546ad3b39104f4b8e7b8daf.zip
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.
Diffstat (limited to 'Test/W01history.ztst')
-rw-r--r--Test/W01history.ztst23
1 files changed, 23 insertions, 0 deletions
diff --git a/Test/W01history.ztst b/Test/W01history.ztst
index 6ef9b11cc..96d0beb61 100644
--- a/Test/W01history.ztst
+++ b/Test/W01history.ztst
@@ -58,3 +58,26 @@
 *?*
 F:Check that a history bug introduced by workers/34160 is working again.
 # Discarded line of error output consumes prompts printed by "zsh -i".
+
+ $ZTST_testdir/../Src/zsh -fis <<<'
+ echo /my/path/for/testing
+ echo !1:1:h10
+ echo !1:1:h3
+ echo !1:1:h2
+ echo !1:1:h1
+ echo !1:1:t10
+ echo !1:1:t3
+ echo !1:1:t2
+ echo !1:1:t1
+ echo !1:1:t3:h2' 2>/dev/null
+0:Modifiers :h and :t with arguments
+>/my/path/for/testing
+>/my/path/for/testing
+>/my/path
+>/my
+>/
+>/my/path/for/testing
+>path/for/testing
+>for/testing
+>testing
+>path/for