1# These are tests of the UnicodeSetBuilder. 2# The format is: 3# <builder_format> ; <old_UnicodeSet_format_or_error> 4# The second field is empty if the formats are the same. 5# It is the error code if an error is expected. 6# 7# The differences in format are that the new format has: 8# && and -- defined as in ICU4C Regex 9# ~~ defined as symmetric difference, as in UTS#18 10# Various quirks for compatibility with Java Regex 11 12@showerror 13\p{Nd} ; 14@hide 15 16# Check - and --; & and && 17 18[[a-z] ; doSetNoCloseError 19[[a-z]-[b-m][s]] ; 20[[a-z]--[b-m][s]] ; [[a-z]-[[b-m][s]]] 21[a-z--b-ms] ; [[a-z]-[[b-m][s]]] 22[[a-z]&[b-m][s]] ; 23[[a-z]&&[b-m][s]] ; [[a-z]&[[b-m][s]]] 24[a-z&&b-ms] ; [[a-z]&[[b-m][s]]] 25 26# Basic 27 28[ab[^a-z]e] ; 29[b\x{AC00}cd-mf] ; 30[^abc] ; 31 32# Properties 33 34[\p{Nd}] ; 35[\P{Nd}] ; 36[\p{gc=Nd}] ; 37[\P{gc=Nd}] ; 38[\p{gc≠Nd}] ; [\P{gc=Nd}] 39[\P{gc≠Nd}] ; [\p{gc=Nd}] 40 41\p{Nd} ; 42\P{Nd} ; 43\p{gc=Nd} ; 44\P{gc=Nd} ; 45\p{gc≠Nd} ; \P{gc=Nd} 46\P{gc≠Nd} ; \p{gc=Nd} 47 48[[:Nd:]] ; 49[[:^Nd:]] ; 50[[:gc=Nd:]] ; 51[[:^gc=Nd:]] ; 52[[:gc≠Nd:]] ; [[:^gc=Nd:]] 53[[:^gc≠Nd:]] ; [[:gc=Nd:]] 54 55[:Nd:] ; 56[:^Nd:] ; 57[:gc=Nd:] ; 58[:^gc=Nd:] ; 59[:gc≠Nd:] ; [:^gc=Nd:] 60[:^gc≠Nd:] ; [:gc=Nd:] 61 62# more set-like objects 63 64\s ; [:white_space:] 65\S ; [:^white-space:] 66\w ; [[:alphabetic:][:Nd:]] 67\W ; [^[:alphabetic:][:Nd:]] 68\d ; [:Nd:] 69\D ; [:^Nd:] 70 71[\s] ; [:white_space:] 72[\S] ; [:^white-space:] 73[\w] ; [[:alphabetic:][:Nd:]] 74[\W] ; [^[:alphabetic:][:Nd:]] 75[\d] ; [:Nd:] 76[\D] ; [:^Nd:] 77 78# characters 79\N{FULL STOP} ; [.] 80[\N{FULL STOP}] 81\x{61} ; [a] 82[\x{61}] ; [a] 83[\a] ; [a] 84[\[] 85 86# quirks 87[:abc] ; [abc\:] 88[abc:] ; [abc\:] 89[-a] ; [a\-] 90[~a] ; [a\~] 91[&a] ; [a\&] 92[--a] ; error 93[&&a] ; error 94[a&b] ; [ab\&] 95[a-[b]] ; [ab\-] 96[[a]-b] ; [ab\-] 97[a&[b]] ; [ab\&] 98[[a]&b] ; [ab\&] 99[a&&] ; error 100[a--] ; error 101[a-b-z] ; [a-b\-z] 102[a-b&z] ; [a-b\&z] 103 104# Logically \N{...} and \x{...}, etc should act like a literal 105# and \s, \w, \p{...} etc. should act like a set 106[\N{FULL STOP}-a] ; [.-a] 107[a-\N{FULL STOP}] ; [.-a] 108[[ab]&\S] ; [[ab]&[:^whitespace:]] 109[\S&[ab]] ; [[ab]&[:^whitespace:]] 110[\s-z] ; [[:whitespace:]\-z] 111[\s&z] ; [[:whitespace:]\&z] 112 113[abc-\p{xx}] ; error 114 115 116