(match:string): New tests.
authorKevin Ryde <user42@zip.com.au>
Tue, 28 Sep 2004 23:53:02 +0000 (23:53 +0000)
committerKevin Ryde <user42@zip.com.au>
Tue, 28 Sep 2004 23:53:02 +0000 (23:53 +0000)
test-suite/tests/regexp.test

index 06550f2..c5d0d3a 100644 (file)
   (pass-if-exception "bad arg 3" exception:wrong-type-arg
     (make-regexp "xyz" regexp/icase 'abc)))
 
+;;;
+;;; match:string
+;;;
+
+(with-test-prefix "match:string"
+
+  (pass-if "foo"
+    (string=? "foo" (match:string (string-match ".*" "foo"))))
+
+  (pass-if "foo offset 1"
+    (string=? "foo" (match:string (string-match ".*" "foo" 1)))))
+
 ;;;
 ;;; regexp-quote
 ;;;