| 1 |
;;-*- coding:utf-8 -*- |
| 2 |
|
| 3 |
;; SRE tests using Unicode chars. |
| 4 |
;; This file is included from regexp.scm. The test-* procedures |
| 5 |
;; are defined there. |
| 6 |
|
| 7 |
;; Charsets |
| 8 |
(test-cset (string->char-set "BC") (& ("ABC") (w/ascii ("кириллица aBC")))) |
| 9 |
(test-ast-error (& ("ABC") (w/ascii ("кириллица aBC") "def"))) |
| 10 |
|
| 11 |
;; The following tests are taken from Chibi's regexp-test.sld |
| 12 |
(test-sre #f '(: bol (* lower) eol) "abcD") |
| 13 |
(test-sre '("abcD") '(w/nocase (* lower)) "abcD") |
| 14 |
(test-sre '("σζ") '(* lower) "σζ") |
| 15 |
(test-sre '("Σ") '(* upper) "Σ") |
| 16 |
(test-sre '("\x01C5;") '(* title) "\x01C5;") |
| 17 |
(test-sre '("σζ\x01C5;") '(w/nocase (* lower)) "σζ\x01C5;") |
| 18 |
|
| 19 |
(test-sre '("кириллица") '(* alpha) "кириллица") |
| 20 |
(test-sre '("") '(w/ascii (* alpha)) "кириллица") |
| 21 |
(test-sre '("кириллица") '(w/nocase "КИРИЛЛИЦА") "кириллица") |
| 22 |
|
| 23 |
(test-sre '("") '(w/ascii (* numeric)) "12345") |
| 24 |
|
| 25 |
(test-sre '("한") '(: bog grapheme eog) "한") |
| 26 |
(test-sre #f '(: "ᄒ" bog grapheme eog "ᆫ") "한") |