summary refs log tree commit diff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-11-13 09:27:14 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2014-11-13 09:27:14 -0800
commitc1d9623d2e564024452096c897f380fa2fcdb831 (patch)
treeda1f3e4b03deb0e7b68bcebb348dc50887a929f3
parent53344183e1300f3dffeaf602ac4b686ce182e884 (diff)
downloadzsh-c1d9623d2e564024452096c897f380fa2fcdb831.tar.gz
zsh-c1d9623d2e564024452096c897f380fa2fcdb831.tar.xz
zsh-c1d9623d2e564024452096c897f380fa2fcdb831.zip
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.
-rw-r--r--ChangeLog2
-rw-r--r--Test/B06fc.ztst6
2 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6b53b1086..86c8afb92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2014-11-13  Barton E. Schaefer  <schaefer@zsh.org>
 
+	* 33686: Test/B06fc.ztst: set PS1 before pattern-matching for it
+
 	* 33656: Src/builtin.c: different algorithm for "whence -am" to
 	produce results more consistent with "whence -m"
 
diff --git a/Test/B06fc.ztst b/Test/B06fc.ztst
index 65ee43d2e..922b0010f 100644
--- a/Test/B06fc.ztst
+++ b/Test/B06fc.ztst
@@ -10,16 +10,16 @@
 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:'
+  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
 *?*%*
 
-  $ZTST_testdir/../Src/zsh +Z -fsi <<< 'fc -p /dev/null a 0'
+  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
 *?*%*
 
-  $ZTST_testdir/../Src/zsh +Z -fsi <<< 'fc -p /dev/null 0 a'
+  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
 *?*%*