Mercurial > hg > xemacs-beta
diff tests/automated/regexp-tests.el @ 5649:d026b665014f
Actually obey POSIX rules in #'posix-string-match, don't ignore them.
src/ChangeLog addition:
2012-04-25 Aidan Kehoe <kehoea@parhasard.net>
* search.c (string_match_1): Actually use the POSIX argument here,
pass it to compile_pattern(). Thank you for the bug report, Ilya
Shlyakhter!
tests/ChangeLog addition:
2012-04-25 Aidan Kehoe <kehoea@parhasard.net>
* automated/regexp-tests.el: Check that #'posix-string-match
actually returns the longest match; thank you Ilya Shlyakhter in
jn1j8t$ujq$1@dough.gmane.org !
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 25 Apr 2012 20:25:33 +0100 |
parents | 3f4a234f4672 |
children | 3df910176b6a |
line wrap: on
line diff
--- a/tests/automated/regexp-tests.el Sat Apr 21 18:58:28 2012 +0100 +++ b/tests/automated/regexp-tests.el Wed Apr 25 20:25:33 2012 +0100 @@ -69,6 +69,15 @@ (Assert (string-match "Ä" "Ä")) (Assert (not (string-match "Ä" "ä")))) +;; Is posix-string-match passing the POSIX flag correctly? + +(Assert + (equal + (save-match-data + (progn (posix-string-match "i\\|ii" "ii") (match-data))) + '(0 2)) + "checking #'posix-string-match actually returns the longest match")) + ;; looking-at (with-temp-buffer (insert "äÄ")