summaryrefslogtreecommitdiff
path: root/.config/shells/zsh/plugins/fzf-tab/modules/Test/B08shift.ztst
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@simplelittledream.com>2022-07-14 19:09:06 -0400
committerJacob McDonnell <jacob@simplelittledream.com>2022-07-14 19:09:06 -0400
commited4daf7429bf2580118aad87b8f3e2011efed7ec (patch)
tree82f9d8ed68de119e5777f5ecfae9df4a92fe92b3 /.config/shells/zsh/plugins/fzf-tab/modules/Test/B08shift.ztst
Initial commit
Diffstat (limited to '.config/shells/zsh/plugins/fzf-tab/modules/Test/B08shift.ztst')
-rw-r--r--.config/shells/zsh/plugins/fzf-tab/modules/Test/B08shift.ztst33
1 files changed, 33 insertions, 0 deletions
diff --git a/.config/shells/zsh/plugins/fzf-tab/modules/Test/B08shift.ztst b/.config/shells/zsh/plugins/fzf-tab/modules/Test/B08shift.ztst
new file mode 100644
index 0000000..0aa9226
--- /dev/null
+++ b/.config/shells/zsh/plugins/fzf-tab/modules/Test/B08shift.ztst
@@ -0,0 +1,33 @@
+# Test the shift builtin.
+
+%test
+
+ set -- one two three four five six seven eight nine ten
+ shift
+ print $*
+ shift 2
+ print $*
+ shift -p 3
+ print $*
+ shift -p
+ print $*
+0:shifting positional parameters
+>two three four five six seven eight nine ten
+>four five six seven eight nine ten
+>four five six seven
+>four five six
+
+ array=(yan tan tether mether pip azer sezar akker conter dick)
+ shift 2 array
+ print $array
+ shift array
+ print $array
+ shift -p 3 array
+ print $array
+ shift -p array
+ print $array
+0:shifting array
+>tether mether pip azer sezar akker conter dick
+>mether pip azer sezar akker conter dick
+>mether pip azer sezar
+>mether pip azer