2008-09-23 10:41:54 +02:00
|
|
|
# Tests of fc command
|
|
|
|
%prep
|
|
|
|
|
|
|
|
mkdir fc.tmp
|
|
|
|
cd fc.tmp
|
|
|
|
print 'fc -l foo' >fcl
|
|
|
|
|
|
|
|
%test
|
2008-10-10 12:16:33 +02:00
|
|
|
$ZTST_testdir/../Src/zsh -f ./fcl
|
2008-09-24 11:10:15 +02:00
|
|
|
1:Checking that fc -l foo doesn't core dump when history is empty
|
2008-09-23 10:41:54 +02:00
|
|
|
?./fcl:fc:1: event not found: foo
|
2014-10-11 20:18:34 +02:00
|
|
|
|
2014-11-13 18:27:14 +01:00
|
|
|
PS1='%% ' $ZTST_testdir/../Src/zsh +Z -fsi <<< $'fc -p /dev/null 0 0\n:'
|
2014-10-11 20:18:34 +02:00
|
|
|
0:Checking that fc -p doesn't core dump when history size is zero
|
|
|
|
*?*%*
|
|
|
|
|
2014-11-13 18:27:14 +01:00
|
|
|
PS1='%% ' $ZTST_testdir/../Src/zsh +Z -fsi <<< 'fc -p /dev/null a 0'
|
2014-10-11 20:18:34 +02:00
|
|
|
1:Checking that fc -p rejects non-integer history size
|
|
|
|
*?*% fc: HISTSIZE must be an integer
|
|
|
|
*?*%*
|
|
|
|
|
2014-11-13 18:27:14 +01:00
|
|
|
PS1='%% ' $ZTST_testdir/../Src/zsh +Z -fsi <<< 'fc -p /dev/null 0 a'
|
2014-10-11 20:18:34 +02:00
|
|
|
1:Checking that fc -p rejects non-integer history save size
|
|
|
|
*?*% fc: SAVEHIST must be an integer
|
|
|
|
*?*%*
|