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