]>
Commit | Line | Data |
---|---|---|
e70833fb VS |
1 | ############################################################################# |
2 | # Name: wxreg.test | |
3 | # Purpose: Additional tests for the regex lib and wxRegEx | |
4 | # Author: Mike Wetherell | |
5 | # RCS-ID: $Id$ | |
6 | # Copyright: (c) 2004 Mike Wetherell. | |
7 | # Licence: wxWidgets licence | |
8 | ############################################################################# | |
9 | ||
10 | # | |
d7204bba VS |
11 | # The layout of this file is the same as reg.test. See the comments in that |
12 | # file for full details. The encoding used in here is UTF-8. | |
e70833fb VS |
13 | # |
14 | # These tests test the character classifications over the ascii range pretty | |
15 | # thoroughly, since hopefully these will be similar for all platforms and | |
16 | # locales where wxWidgets runs. | |
17 | # | |
18 | # Also does some tests involving western european and cyrillic characters. | |
19 | # In Unicode mode, all these tests should succeed, which verifies that the | |
20 | # classifications aren't limited to a single 8-bit character set. | |
21 | # | |
22 | # In non-unicode mode, if the test can't be translated into the character | |
23 | # encoding of the current locale, the test will be skipped. So either may | |
24 | # succeed or be skipped. | |
25 | # | |
26 | ||
27 | doing wx_1 "character classification: ascii" | |
28 | m 1 & {[^[:alnum:]]} "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!" "!" | |
29 | m 2 & {[[:alnum:]]} "\a\b\t\n\v\f\r !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~X" "X" | |
30 | m 3 & {[^[:alpha:]]} "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!" "!" | |
31 | m 4 & {[[:alpha:]]} "\a\b\t\n\v\f\r !\"#$%&'()*+,-./0123456789:;<=>?@[\\]^_`{|}~X" "X" | |
32 | m 5 & {[^[:cntrl:]]} "\a\b\t\n\v\f\r!" "!" | |
33 | m 6 & {[[:cntrl:]]} " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\n" "\n" | |
34 | m 7 & {[^[:digit:]]} "0123456789!" "!" | |
35 | m 8 & {[[:digit:]]} "\a\b\t\n\v\f\r !\"#$%&'()*+,-./:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ 0" "0" | |
36 | m 9 & {[^[:graph:]]} "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\n" "\n" | |
37 | m 10 & {[[:graph:]]} "\a\b\t\n\v\f\r !" "!" | |
38 | m 11 & {[^[:lower:]]} "abcdefghijklmnopqrstuvwxyz!" "!" | |
39 | m 12 & {[[:lower:]]} "\a\b\t\n\v\f\r !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`{|}~x" "x" | |
40 | m 13 & {[^[:print:]]} "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\n" "\n" | |
41 | m 14 & {[[:print:]]} "\a\b\n\v\f\rX" "X" | |
42 | m 15 & {[^[:punct:]]} "!\"#%&'()*,-./:;?@[\\]_{}X" "X" | |
43 | m 16 & {[[:punct:]]} "\a\b\t\n\v\f\r 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!" "!" | |
44 | m 17 & {[^[:space:]]} "\t\n\v\f\r X" "X" | |
45 | m 18 & {[[:space:]]} "\a\b!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\n" "\n" | |
46 | m 19 & {[^[:upper:]]} "ABCDEFGHIJKLMNOPQRSTUVWXYZ!" "!" | |
47 | m 20 & {[[:upper:]]} "\a\b\t\n\v\f\r !\"#$%&'()*+,-./0123456789:;<=>?@[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~X" "X" | |
48 | m 21 & {[^[:xdigit:]]} "0123456789ABCDEFabcdef!" "!" | |
49 | m 22 & {[[:xdigit:]]} "\a\b\t\n\v\f\r !\"#$%&'()*+,-./:;<=>?@GHIJKLMNOPQRSTUVWXYZ[\\]^_`ghijklmnopqrstuvwxyz{|}~a" "a" | |
50 | i 23 &i "AbCdEfGhIjKlMnOpQrStUvWxYz" "aBcDeFgHiJkLmNoPqRsTuVwXyZ" "0 25" | |
51 | ||
52 | doing wx_2 "character classification: western european" | |
53 | m 1 & {[^[:alpha:]]} "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ!" "!" | |
54 | m 2 & {[[:alpha:]]} " ¡¢£¤¥¦§¨©«¬®¯°±²³´¶·¸¹»¼½¾¿×÷X" "X" | |
55 | m 3 & {[^[:lower:]]} "ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ!" "!" | |
56 | m 4 & {[[:lower:]]} " ¡¢£¤¥¦§¨©«¬®¯°±²³´¶·¸¹»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞ÷x" "x" | |
57 | m 5 & {[^[:upper:]]} "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ!" "!" | |
58 | m 6 & {[[:upper:]]} " ¡¢£¤¥¦§¨©«¬®¯°±²³´¶·¸¹»¼½¾¿×ßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿX" "X" | |
59 | i 7 &i* "ÀáÂãÄåÆçÈéÊëÌíÎïÐñÒóÔõÖøÙúÛüÝþ" "àÁâÃäÅæÇèÉêËìÍîÏðÑòÓôÕöØùÚûÜýÞ" "0 29" | |
60 | ||
61 | doing wx_3 "character classification: cyrillic" | |
62 | m 1 & {[^[:alpha:]]} "ёЁюабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ!" "!" | |
63 | m 2 & {[^[:lower:]]} "ёюабцдефгхийклмнопярстужвьызшэщчъ!" "!" | |
64 | m 3 & {[[:lower:]]} "ЁЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪx" "x" | |
65 | m 4 & {[^[:upper:]]} "ЁЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ!" "!" | |
66 | m 5 & {[[:upper:]]} "ёюабцдефгхийклмнопярстужвьызшэщчъX" "X" | |
67 | i 6 &i* "ЁюАбЦдЕфГхИйКлМнОпЯрСтУжВьЫзШэЩчЪ" "ёЮаБцДеФгХиЙкЛмНоПяРсТуЖвЬыЗшЭщЧъ" "0 32" | |
68 | ||
69 | #doing bugs "known bugs" | |
70 | #m 1 - {(\w+).*?(\d\d:\d\d)} "from 10:30 until 12:00" "from" "10:30" | |
71 |