1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-11 12:28:59 +01:00
zsh/Test/B06fc.ztst
Barton E. Schaefer c1d9623d2e 33686: set PS1 before pattern-matching for it
If run as a privleged user, the default PS1 does not contain "%", so
don't use the default PS1 when expecting to match "%" in the output.
2014-11-13 09:27:14 -08:00

26 lines
716 B
Plaintext

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