comparison tests/automated/regexp-tests.el @ 1195:dff007bd492b

[xemacs-hg @ 2003-01-09 12:49:36 by stephent] unit test cases <873co2wkua.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Thu, 09 Jan 2003 12:49:43 +0000
parents 2af1f88a2d31
children 6355bae896e3
comparison
equal deleted inserted replaced
1194:b28cb5c230a2 1195:dff007bd492b
277 (Assert (eq (string-match "[^A]" (string ch1)) 0)) 277 (Assert (eq (string-match "[^A]" (string ch1)) 0))
278 (Assert (not (string-match "@A" (string ?@ ch1)))) 278 (Assert (not (string-match "@A" (string ?@ ch1))))
279 (Assert (not (string-match "@[A]" (string ?@ ch1)))) 279 (Assert (not (string-match "@[A]" (string ?@ ch1))))
280 (Assert (eq (string-match "@[^A]" (string ?@ ch1)) 0)) 280 (Assert (eq (string-match "@[^A]" (string ?@ ch1)) 0))
281 (Assert (not (string-match "@?A" (string ?@ ch1)))))) 281 (Assert (not (string-match "@?A" (string ?@ ch1))))))
282
283 ;; More stale match data tests.
284 ;; Thanks to <bjacob@ca.metsci.com>.
285 (Assert (not (progn (string-match "a" "a")
286 (string-match "b" "a")
287 (match-string 0 "a"))))
288 (Assert (not (progn (string-match "a" "a")
289 (string-match "b" "a")
290 (match-string 1 "a"))))
291 (Assert (not (progn (string-match "\\(a\\)" "a")
292 (string-match "\\(b\\)" "a")
293 (match-string 0 "a"))))
294 (Assert (not (progn (string-match "\\(a\\)" "a")
295 (string-match "\\(b\\)" "a")
296 (match-string 1 "a"))))