summaryrefslogtreecommitdiff
path: root/dotfiles/system/.zsh/modules/Test/B06fc.ztst
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-05-21 22:01:35 -0500
committerCraig Jennings <c@cjennings.net>2025-05-21 22:01:35 -0500
commitb4463015b97912658d630377fafbf630f7588d1e (patch)
treed04b66d992fe2ce88391889c21c5d8dc97acd0ef /dotfiles/system/.zsh/modules/Test/B06fc.ztst
parent548154ea395356868e87980b149dfc0abdc84e17 (diff)
moving arch dotfiles into archsetup
Diffstat (limited to 'dotfiles/system/.zsh/modules/Test/B06fc.ztst')
-rw-r--r--dotfiles/system/.zsh/modules/Test/B06fc.ztst25
1 files changed, 25 insertions, 0 deletions
diff --git a/dotfiles/system/.zsh/modules/Test/B06fc.ztst b/dotfiles/system/.zsh/modules/Test/B06fc.ztst
new file mode 100644
index 0000000..922b001
--- /dev/null
+++ b/dotfiles/system/.zsh/modules/Test/B06fc.ztst
@@ -0,0 +1,25 @@
+# Tests of fc command
+%prep
+
+ mkdir fc.tmp
+ cd fc.tmp
+ print 'fc -l foo' >fcl
+
+%test
+ $ZTST_testdir/../Src/zsh -f ./fcl
+1:Checking that fc -l foo doesn't core dump when history is empty
+?./fcl:fc:1: event not found: foo
+
+ PS1='%% ' $ZTST_testdir/../Src/zsh +Z -fsi <<< $'fc -p /dev/null 0 0\n:'
+0:Checking that fc -p doesn't core dump when history size is zero
+*?*%*
+
+ PS1='%% ' $ZTST_testdir/../Src/zsh +Z -fsi <<< 'fc -p /dev/null a 0'
+1:Checking that fc -p rejects non-integer history size
+*?*% fc: HISTSIZE must be an integer
+*?*%*
+
+ PS1='%% ' $ZTST_testdir/../Src/zsh +Z -fsi <<< 'fc -p /dev/null 0 a'
+1:Checking that fc -p rejects non-integer history save size
+*?*% fc: SAVEHIST must be an integer
+*?*%*