summaryrefslogtreecommitdiff
path: root/Test/D01prompt.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/D01prompt.ztst')
-rw-r--r--Test/D01prompt.ztst34
1 files changed, 34 insertions, 0 deletions
diff --git a/Test/D01prompt.ztst b/Test/D01prompt.ztst
index 7ff478e68..6879e6fd1 100644
--- a/Test/D01prompt.ztst
+++ b/Test/D01prompt.ztst
@@ -229,3 +229,37 @@
Ffoo=${(%):-'%F{foo}'} # Unrecognised
[[ $f == $Fdefault && $Fdefault == $Freset && $Freset == $Ffoo ]]
0:Regression test for workers/44029
+
+ if
+ zmodload zsh/terminfo >& /dev/null &&
+ (( terminfo[colors] >= 8 ))
+ then
+ F1=$(echoti setaf 2)
+ F2=${(%):-%2F}
+ F3=${(%):-%F{2}}
+ F4=${(%):-%F{green}}
+ [[ -n $F1 && $F1 = $F2 && $F2 = $F3 && $F3 = $F4 ]]
+ else
+ ZTST_skip='Missing terminfo module or non-colour terminal'
+ fi
+0:Equivalence of terminal colour settings (foreground colour)
+
+ if
+ zmodload zsh/terminfo >& /dev/null &&
+ (( terminfo[colors] >= 8 ))
+ then
+ K1=$(echoti setab 2)
+ K2=${(%):-%2K}
+ K3=${(%):-%K{2}}
+ K4=${(%):-%K{green}}
+ [[ -n $K1 && $K1 = $K2 && $K2 = $K3 && $K3 = $K4 ]]
+ else
+ ZTST_skip='Missing terminfo module or non-colour terminal'
+ fi
+0:Equivalence of terminal colour settings (background colour)
+
+ (RPS1=foo; echo $RPS1 $RPROMPT)
+ (RPS2=bar; echo $RPS2 $RPROMPT2)
+-fD:RPS1 and RPROMPT are aliases (regression from 5.0.6) (workers/49600)
+>foo foo
+>bar bar