diff tests/automated/regexp-tests.el @ 2254:cf4470caf504

[xemacs-hg @ 2004-09-08 10:21:57 by stephent] test Yamaoka bug <87acw1vz73.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Wed, 08 Sep 2004 10:22:01 +0000
parents 61179c12fbb7
children df2fafa399a1
line wrap: on
line diff
--- a/tests/automated/regexp-tests.el	Tue Sep 07 21:50:34 2004 +0000
+++ b/tests/automated/regexp-tests.el	Wed Sep 08 10:22:01 2004 +0000
@@ -394,3 +394,17 @@
 			  (string-match "b" a)
 			  (match-string 1 a))
 		   a)))
+
+;; bug identified by Katsumi Yamaoka 2004-09-03 <b9ywtzbbpue.fsf_-_@jpl.org>
+;; fix submitted by sjt 2004-09-08
+;; trailing comments are values from buggy 21.4.15
+(let ((text "abc"))
+  (Assert (eq 0 (string-match "\\(?:ab+\\)*c" text)))	; 2
+  (Assert (eq 0 (string-match "^\\(?:ab+\\)*c" text)))	; nil
+  (Assert (eq 0 (string-match "^\\(?:ab+\\)*" text)))	; 0
+  (Assert (eq 0 (string-match "^\\(?:ab+\\)c" text)))	; 0
+  (Assert (eq 0 (string-match "^\\(?:ab\\)*c" text)))	; 0
+  (Assert (eq 0 (string-match "^\\(?:a+\\)*b" text)))	; nil
+  (Assert (eq 0 (string-match "^\\(?:a\\)*b" text)))	; 0
+)
+