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