Mercurial > hg > xemacs-beta
comparison tests/automated/regexp-tests.el @ 2324:df2fafa399a1
[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>
author | stephent |
---|---|
date | Thu, 07 Oct 2004 08:01:44 +0000 |
parents | cf4470caf504 |
children | 60989130c706 |
comparison
equal
deleted
inserted
replaced
2323:dc1c909a7a15 | 2324:df2fafa399a1 |
---|---|
406 (Assert (eq 0 (string-match "^\\(?:ab\\)*c" text))) ; 0 | 406 (Assert (eq 0 (string-match "^\\(?:ab\\)*c" text))) ; 0 |
407 (Assert (eq 0 (string-match "^\\(?:a+\\)*b" text))) ; nil | 407 (Assert (eq 0 (string-match "^\\(?:a+\\)*b" text))) ; nil |
408 (Assert (eq 0 (string-match "^\\(?:a\\)*b" text))) ; 0 | 408 (Assert (eq 0 (string-match "^\\(?:a\\)*b" text))) ; 0 |
409 ) | 409 ) |
410 | 410 |
411 ;; per Steve Youngs 2004-09-30 <microsoft-free.87ekkjhj7t.fsf@youngs.au.com> | |
412 ;; fix submitted by sjt 2004-10-07 | |
413 ;; trailing comments are values from buggy 21.4.pre16 | |
414 (let ((text "abc")) | |
415 (Assert (eq 0 (string-match "\\(?:a\\(b\\)\\)" text))) ; 0 | |
416 (Assert (string= (match-string 1 text) "b")) ; ab | |
417 (Assert (null (match-string 2 text))) ; b | |
418 (Assert (null (match-string 3 text))) ; nil | |
419 (Assert (eq 0 (string-match "\\(?:a\\(?:b\\(c\\)\\)\\)" text))) ; 0 | |
420 (Assert (string= (match-string 1 text) "c")) ; abc | |
421 (Assert (null (match-string 2 text))) ; ab | |
422 (Assert (null (match-string 3 text))) ; c | |
423 (Assert (null (match-string 4 text))) ; nil | |
424 ) | |
425 |