# HG changeset patch # User stephent # Date 1094638921 0 # Node ID cf4470caf50411ee5df986af08d6ca8e5e396631 # Parent d5f3c86c0ee39d1fbb32ac4518c5399b6069e406 [xemacs-hg @ 2004-09-08 10:21:57 by stephent] test Yamaoka bug <87acw1vz73.fsf@tleepslib.sk.tsukuba.ac.jp> diff -r d5f3c86c0ee3 -r cf4470caf504 tests/ChangeLog --- a/tests/ChangeLog Tue Sep 07 21:50:34 2004 +0000 +++ b/tests/ChangeLog Wed Sep 08 10:22:01 2004 +0000 @@ -1,3 +1,8 @@ +2004-09-08 Stephen J. Turnbull + + * automated/regexp-tests.el: Add tests for bug identified by + Katsumi Yamaoka 2004-09-03 . + 2004-05-14 Stephen J. Turnbull * automated/tag-tests.el (first form): Put non-ASCII chars back. diff -r d5f3c86c0ee3 -r cf4470caf504 tests/automated/regexp-tests.el --- 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 +;; 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 +) +