summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
Diffstat (limited to 'Test')
-rw-r--r--Test/D02glob.ztst8
-rw-r--r--Test/D04parameter.ztst9
2 files changed, 17 insertions, 0 deletions
diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst
index 3e2095a0c..f944a4fbd 100644
--- a/Test/D02glob.ztst
+++ b/Test/D02glob.ztst
@@ -574,3 +574,11 @@
 0:Optimisation to squeeze multiple *'s used as ordinary glob wildcards.
 >glob.tmp/ra=1.0_et=3.5
 >glob.tmp/ra=1.0_et=3.5
+
+  [[ 1_2_ = (*_)(#c1) ]] && print 1 OK  # because * matches 1_2
+  [[ 1_2_ = (*_)(#c2) ]] && print 2 OK
+  [[ 1_2_ = (*_)(#c3) ]] || print 3 OK
+0:Some more complicated backtracking with match counts.
+>1 OK
+>2 OK
+>3 OK
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index f1cc23e7c..cb7079c98 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -1735,3 +1735,12 @@
 0:History modifier works the same for scalar and array substitution
 >ddd bdb cdc
 >ddd bdb cdc
+
+ a=1_2_3_4_5_6
+ print ${a#(*_)(#c2)}
+ print ${a#(*_)(#c5)}
+ print ${a#(*_)(#c7)}
+0:Complicated backtracking with match counts
+>3_4_5_6
+>6
+>1_2_3_4_5_6