diff options
Diffstat (limited to 'Test/D01prompt.ztst')
-rw-r--r-- | Test/D01prompt.ztst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Test/D01prompt.ztst b/Test/D01prompt.ztst index 6879e6fd1..f42e19714 100644 --- a/Test/D01prompt.ztst +++ b/Test/D01prompt.ztst @@ -70,6 +70,13 @@ >true >false + sec=$SECONDS + eval "print -P '%(${sec}S.true.false)'" + eval "print -P '%($((sec+30))S.true.false)'" +0:ternary prompt escape with test character S +>true +>false + print -P 'start %10<...<truncated at 10%<< Not truncated%3< ...<Not shown' print -P 'start %10>...>truncated at 10%>> Not truncated%3> ...>Not shown' 0:prompt truncation @@ -258,6 +265,19 @@ fi 0:Equivalence of terminal colour settings (background colour) + A1=${(%):-%s} + A2=${(%):-%u} + A3=${(%):-%s%u%s} + [[ $A3 = $A1$A2 ]] +0:Attribute optimisation - preserve initial disabling of attribute but drop useless later one + + : ${(%):-%K{blue}} + A1="${(%):-%b}x" + : ${(%):-%k} + A2="${(%):-%b}x" + [[ $A1 = $A2 && -n $A1 && -n $A2 ]] +0:Don't restore attributes from earlier substitution after disabling bold + (RPS1=foo; echo $RPS1 $RPROMPT) (RPS2=bar; echo $RPS2 $RPROMPT2) -fD:RPS1 and RPROMPT are aliases (regression from 5.0.6) (workers/49600) |