diff tests/automated/regexp-tests.el @ 1095:0d33547d9ed3

[xemacs-hg @ 2002-11-11 15:39:03 by stephent] testing improvements <87adkgyv5v.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Mon, 11 Nov 2002 15:39:07 +0000
parents ccaf90c5a53a
children 2af1f88a2d31
line wrap: on
line diff
--- a/tests/automated/regexp-tests.el	Mon Nov 11 15:34:13 2002 +0000
+++ b/tests/automated/regexp-tests.el	Mon Nov 11 15:39:07 2002 +0000
@@ -229,10 +229,8 @@
   (Assert (string= (match-string 1) nil)))
 
 ;; Test word boundaries
-(Assert (= (string-match " \\<a" " a") 0))
-(Assert (= (string-match "a\\> " "a ") 0))
-(Assert (= (string-match " \\ba" " a") 0))
-(Assert (= (string-match "a\\b " "a ") 0))
+(Assert (= (string-match "\\<a" " a") 1))
+(Assert (= (string-match "a\\>" "a ") 0))
 (Assert (= (string-match "\\ba" " a") 1))
 (Assert (= (string-match "a\\b" "a ") 0))
 ;; should work at target boundaries
@@ -240,6 +238,10 @@
 (Assert (= (string-match "a\\>" "a") 0))
 (Assert (= (string-match "\\ba" "a") 0))
 (Assert (= (string-match "a\\b" "a") 0))
+;; Check for weirdness
+(Assert (not (string-match " \\> " "  ")))
+(Assert (not (string-match " \\< " "  ")))
+(Assert (not (string-match " \\b " "  ")))
 ;; but not if the "word" would be on the null side of the boundary!
 (Assert (not (string-match "\\<" "")))
 (Assert (not (string-match "\\>" "")))
@@ -247,7 +249,8 @@
 (Assert (not (string-match "\\> " " ")))
 (Assert (not (string-match "a\\<" "a")))
 (Assert (not (string-match "\\>a" "a")))
-;; Expect these to fail :-(
-(Assert (not (string-match "\\b" "")))
-(Assert (not (string-match " \\b" " ")))
-(Assert (not (string-match "\\b " " ")))
+(Known-Bug-Expect-Failure
+ (Assert (not (string-match "\\b" "")))
+ (Assert (not (string-match "\\b" " ")))
+ (Assert (not (string-match " \\b" " ")))
+ (Assert (not (string-match "\\b " " "))))