about summary refs log tree commit diff
path: root/Test/D01prompt.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/D01prompt.ztst')
-rw-r--r--Test/D01prompt.ztst19
1 files changed, 19 insertions, 0 deletions
diff --git a/Test/D01prompt.ztst b/Test/D01prompt.ztst
index 3fb27e620..55861cca1 100644
--- a/Test/D01prompt.ztst
+++ b/Test/D01prompt.ztst
@@ -257,3 +257,22 @@
     ZTST_skip='Missing terminfo module or non-colour terminal'
   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)
+>foo foo
+>bar bar