about summary refs log tree commit diff
path: root/Test/B06fc.ztst
blob: 65ee43d2eb7846cd34049e2dac5aff188e7f8abe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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

  $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
*?*%*

  $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
*?*%*

  $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
*?*%*