Mercurial > hg > xemacs-beta
diff tests/automated/regexp-tests.el @ 1425:74cb069b8417
[xemacs-hg @ 2003-04-23 15:42:44 by stephent]
stale match data <87fzo99rje.fsf@tleepslib.sk.tsukuba.ac.jp>
new split-string <87d6jd9qis.fsf@tleepslib.sk.tsukuba.ac.jp>
support (info "(file)node") <87adeh9qa7.fsf@tleepslib.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Wed, 23 Apr 2003 15:42:52 +0000 |
parents | aa15a2bbba1a |
children | 4c87ece1e837 |
line wrap: on
line diff
--- a/tests/automated/regexp-tests.el Tue Apr 22 03:24:13 2003 +0000 +++ b/tests/automated/regexp-tests.el Wed Apr 23 15:42:52 2003 +0000 @@ -205,14 +205,13 @@ ;; (test-regex-charset-mule-paranoid) -;; Test replace-match +;; Test that replace-match errors after a failed match (with-temp-buffer (insert "This is a test buffer.") (goto-char (point-min)) (search-forward "this is a test ") (looking-at "Unmatchable text") - (replace-match "") - (Assert (looking-at "^buffer.$"))) + (Check-Error args-out-of-range (replace-match ""))) ;; Test that trivial regexps reset unused registers ;; Thanks to Martin Sternholm for the report. @@ -282,6 +281,8 @@ ;; More stale match data tests. ;; Thanks to <bjacob@ca.metsci.com>. +;; These tests used to fail because we cleared match data only on success. +;; Fixed 2003-04-17. (Assert (not (progn (string-match "a" "a") (string-match "b" "a") (match-string 0 "a"))))