# HG changeset patch # User stephent # Date 1097136104 0 # Node ID df2fafa399a1ceb6d3923e9c1336cbd7e0ce21a9 # Parent dc1c909a7a154891fcc8808435f1203288dbc3dd [xemacs-hg @ 2004-10-07 08:01:41 by stephent] test for shy groups counted in registers bug <87vfdnx8n7.fsf@tleepslib.sk.tsukuba.ac.jp> diff -r dc1c909a7a15 -r df2fafa399a1 tests/ChangeLog --- a/tests/ChangeLog Wed Oct 06 21:51:33 2004 +0000 +++ b/tests/ChangeLog Thu Oct 07 08:01:44 2004 +0000 @@ -1,3 +1,8 @@ +2004-10-07 Stephen J. Turnbull + + * automated/regexp-tests.el: Add tests for bug identified by + Steve Youngs 2004-09-30 + 2004-09-08 Stephen J. Turnbull * automated/regexp-tests.el: Add tests for bug identified by diff -r dc1c909a7a15 -r df2fafa399a1 tests/automated/regexp-tests.el --- a/tests/automated/regexp-tests.el Wed Oct 06 21:51:33 2004 +0000 +++ b/tests/automated/regexp-tests.el Thu Oct 07 08:01:44 2004 +0000 @@ -408,3 +408,18 @@ (Assert (eq 0 (string-match "^\\(?:a\\)*b" text))) ; 0 ) +;; per Steve Youngs 2004-09-30 +;; fix submitted by sjt 2004-10-07 +;; trailing comments are values from buggy 21.4.pre16 +(let ((text "abc")) + (Assert (eq 0 (string-match "\\(?:a\\(b\\)\\)" text))) ; 0 + (Assert (string= (match-string 1 text) "b")) ; ab + (Assert (null (match-string 2 text))) ; b + (Assert (null (match-string 3 text))) ; nil + (Assert (eq 0 (string-match "\\(?:a\\(?:b\\(c\\)\\)\\)" text))) ; 0 + (Assert (string= (match-string 1 text) "c")) ; abc + (Assert (null (match-string 2 text))) ; ab + (Assert (null (match-string 3 text))) ; c + (Assert (null (match-string 4 text))) ; nil +) +