source: trunk/essentials/sys-apps/gawk/test/regx8bit.awk

Last change on this file was 3076, checked in by bird, 18 years ago

gawk 3.1.5

File size: 979 bytes
Line 
1# The full test will only work in a Swedish localte
2# Try things that should work across the board
3# BEGIN {
4# s = "så är det"
5# print match(s,/\yså\y/), s ~ /\yså\y/, "å" ~ /\w/
6# }
7BEGIN {
8 printf "\"å\" = %c\n", "å"
9 printf "\"ä\" = %c\n", "ä"
10 s = "så är det"
11 printf "s = \"%s\"\n", s
12 printf "match(s,/\\yså/) = %d\n", match(s, /\yså/)
13# printf "match(s,/så\\y/) = %d\n", match(s, /så\y/)
14# printf "match(s,/\\yså\\y/) = %d\n", match(s, /\yså\y/)
15 printf "s ~ /å/ = %d\n", s ~ /å/
16 printf "s ~ /så/ = %d\n", s ~ /så/
17 printf "s ~ /\\yså/ = %d\n", s ~ /\yså/
18# printf "s ~ /så\\y/ = %d\n", s ~ /så\y/
19# printf "s ~ /\\yså\\y/ = %d\n", s ~ /\yså\y/
20# printf "\"å\" ~ /\\w/ = %d\n", "å" ~ /\w/
21# printf "\"ä\" ~ /\\w/ = %d\n", "ä" ~ /\w/
22# printf "\"å\" ~ /\\yä\\y/ = %d\n", "å" ~ /\yå\y/
23# printf "\"ä\" ~ /\\yä\\y/ = %d\n", "ä" ~ /\yä\y/
24# printf "\"å\" ~ /[[:alpha:]]/ = %d\n", "å" ~ /[[:alpha:]]/
25# printf "\"ä\" ~ /[[:alpha:]]/ = %d\n", "ä" ~ /[[:alpha:]]/
26}
Note: See TracBrowser for help on using the repository browser.