aboutsummaryrefslogtreecommitdiffstats
path: root/test-cases/case2_positive_lookahead
diff options
context:
space:
mode:
authorJonas Maier <jonas@x77.dev>2026-06-02 23:52:23 +0200
committerJonas Maier <jonas@x77.dev>2026-06-02 23:52:23 +0200
commit5ce263b586c5047d16ee93cc53bc3bce6f7ff12c (patch)
tree5b009e8404723f1f91b22085fc06cf8324555be7 /test-cases/case2_positive_lookahead
parentec7d2f2b16a0cd2b5a1185284cafa8725c26a160 (diff)
downloadpish-5ce263b586c5047d16ee93cc53bc3bce6f7ff12c.tar.gz
fix lookahead
Diffstat (limited to 'test-cases/case2_positive_lookahead')
-rw-r--r--test-cases/case2_positive_lookahead/script.sh14
-rw-r--r--test-cases/case2_positive_lookahead/stdout.txt2
2 files changed, 16 insertions, 0 deletions
diff --git a/test-cases/case2_positive_lookahead/script.sh b/test-cases/case2_positive_lookahead/script.sh
index f19441a..053461d 100644
--- a/test-cases/case2_positive_lookahead/script.sh
+++ b/test-cases/case2_positive_lookahead/script.sh
@@ -88,4 +88,18 @@ match x4 aaaaaaaaaaae no
match x4 aaaaaaaaaaaae yes
echo x4
+fun x5 {
+ case $1 {
+ (?=(a.)*e)(?=(a..)*e)(?=(a....)*e).*e { echo yes }
+ .* { echo no }
+ }
+}
+match x5 e yes
+match x5 aaaaaaaaaaaaaaaaaaaaaaaaaaaaae no
+match x5 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaae yes
+match x5 a.aaaaaaaaaaaaaaaaaaaaaaaaaaa.e yes
+match x5 .aaaaaaaaaaaaaaaaaaaaaaaaaaaaae no
+match x5 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae no
+echo x5
+
echo done
diff --git a/test-cases/case2_positive_lookahead/stdout.txt b/test-cases/case2_positive_lookahead/stdout.txt
index ffa387f..fa2c182 100644
--- a/test-cases/case2_positive_lookahead/stdout.txt
+++ b/test-cases/case2_positive_lookahead/stdout.txt
@@ -1,6 +1,8 @@
begin
+x0
x1
x2
x3
x4
+x5
done