diff options
Diffstat (limited to 'src/test/locale/gr_GR.ISO8859-7')
12 files changed, 557 insertions, 0 deletions
diff --git a/src/test/locale/gr_GR.ISO8859-7/Makefile b/src/test/locale/gr_GR.ISO8859-7/Makefile new file mode 100644 index 0000000..28a72b7 --- /dev/null +++ b/src/test/locale/gr_GR.ISO8859-7/Makefile @@ -0,0 +1,7 @@ +all: + +test: + ./runall + +clean: + rm -f *.out diff --git a/src/test/locale/gr_GR.ISO8859-7/README b/src/test/locale/gr_GR.ISO8859-7/README new file mode 100644 index 0000000..a3dad44 --- /dev/null +++ b/src/test/locale/gr_GR.ISO8859-7/README @@ -0,0 +1,4 @@ +src/test/locale/gr_GR.ISO8859-7/README + +gr_GR.ISO8859-7 (Greek) locale test. +Created by Angelos Karageorgiou <angelos@awesome.incredible.com> diff --git a/src/test/locale/gr_GR.ISO8859-7/expected/gr-ctype.out b/src/test/locale/gr_GR.ISO8859-7/expected/gr-ctype.out new file mode 100644 index 0000000..833d706 --- /dev/null +++ b/src/test/locale/gr_GR.ISO8859-7/expected/gr-ctype.out @@ -0,0 +1,257 @@ +char# char alnum alpha cntrl digit lower graph print punct space upper xdigit lo up +chr#0 + +chr#1 + +chr#2 + +chr#3 + +chr#4 + +chr#5 + +chr#6 + +chr#7 + +chr#8 + +chr#9 + + +chr#10 + + +chr#11 + + +chr#12 + + +chr#13 + + +chr#14 + +chr#15 + +chr#16 + +chr#17 + +chr#18 + +chr#19 + +chr#20 + +chr#21 + +chr#22 + +chr#23 + +chr#24 + +chr#25 + +chr#26 + +chr#27 + +chr#28 + +chr#29 + +chr#30 + +chr#31 + +chr#32 + + +chr#33 ! + + + ! ! +chr#34 " + + + " " +chr#35 # + + + # # +chr#36 $ + + + $ $ +chr#37 % + + + % % +chr#38 & + + + & & +chr#39 ' + + + ' ' +chr#40 ( + + + ( ( +chr#41 ) + + + ) ) +chr#42 * + + + * * +chr#43 + + + + + + +chr#44 , + + + , , +chr#45 - + + + - - +chr#46 . + + + . . +chr#47 / + + + / / +chr#48 0 + + + + + 0 0 +chr#49 1 + + + + + 1 1 +chr#50 2 + + + + + 2 2 +chr#51 3 + + + + + 3 3 +chr#52 4 + + + + + 4 4 +chr#53 5 + + + + + 5 5 +chr#54 6 + + + + + 6 6 +chr#55 7 + + + + + 7 7 +chr#56 8 + + + + + 8 8 +chr#57 9 + + + + + 9 9 +chr#58 : + + + : : +chr#59 ; + + + ; ; +chr#60 < + + + < < +chr#61 = + + + = = +chr#62 > + + + > > +chr#63 ? + + + ? ? +chr#64 @ + + + @ @ +chr#65 A + + + + + + a A +chr#66 B + + + + + + b B +chr#67 C + + + + + + c C +chr#68 D + + + + + + d D +chr#69 E + + + + + + e E +chr#70 F + + + + + + f F +chr#71 G + + + + + g G +chr#72 H + + + + + h H +chr#73 I + + + + + i I +chr#74 J + + + + + j J +chr#75 K + + + + + k K +chr#76 L + + + + + l L +chr#77 M + + + + + m M +chr#78 N + + + + + n N +chr#79 O + + + + + o O +chr#80 P + + + + + p P +chr#81 Q + + + + + q Q +chr#82 R + + + + + r R +chr#83 S + + + + + s S +chr#84 T + + + + + t T +chr#85 U + + + + + u U +chr#86 V + + + + + v V +chr#87 W + + + + + w W +chr#88 X + + + + + x X +chr#89 Y + + + + + y Y +chr#90 Z + + + + + z Z +chr#91 [ + + + [ [ +chr#92 \ + + + \ \ +chr#93 ] + + + ] ] +chr#94 ^ + + + ^ ^ +chr#95 _ + + + _ _ +chr#96 ` + + + ` ` +chr#97 a + + + + + + a A +chr#98 b + + + + + + b B +chr#99 c + + + + + + c C +chr#100 d + + + + + + d D +chr#101 e + + + + + + e E +chr#102 f + + + + + + f F +chr#103 g + + + + + g G +chr#104 h + + + + + h H +chr#105 i + + + + + i I +chr#106 j + + + + + j J +chr#107 k + + + + + k K +chr#108 l + + + + + l L +chr#109 m + + + + + m M +chr#110 n + + + + + n N +chr#111 o + + + + + o O +chr#112 p + + + + + p P +chr#113 q + + + + + q Q +chr#114 r + + + + + r R +chr#115 s + + + + + s S +chr#116 t + + + + + t T +chr#117 u + + + + + u U +chr#118 v + + + + + v V +chr#119 w + + + + + w W +chr#120 x + + + + + x X +chr#121 y + + + + + y Y +chr#122 z + + + + + z Z +chr#123 { + + + { { +chr#124 | + + + | | +chr#125 } + + + } } +chr#126 ~ + + + ~ ~ +chr#127 + + + + + +chr#128 + + + + + +chr#129 + + + + + +chr#130 + + + + + +chr#131 + + + + + +chr#132 + + + + + +chr#133 + + + + + +chr#134 + + + + + +chr#135 + + + + + +chr#136 + + + + + +chr#137 + + + + + +chr#138 + + + + + +chr#139 + + + + + +chr#140 + + + + + +chr#141 + + + + + +chr#142 + + + + + +chr#143 + + + + + +chr#144 + + + + + +chr#145 + + + + + +chr#146 + + + + + +chr#147 + + + + + +chr#148 + + + + + +chr#149 + + + + + +chr#150 + + + + + +chr#151 + + + + + +chr#152 + + + + + +chr#153 + + + + + +chr#154 + + + + + +chr#155 + + + + + +chr#156 + + + + + +chr#157 + + + + + +chr#158 + + + + + +chr#159 + + + + + +chr#160 + + + + +chr#161 + + + + +chr#162 + + + + + +chr#163 + + + + +chr#164 + + + + +chr#165 + + + + +chr#166 + + + + +chr#167 + + + + +chr#168 + + + + +chr#169 + + + + +chr#170 + + + + +chr#171 + + + + +chr#172 + + + + +chr#173 + + + + +chr#174 + + + + +chr#175 + + + + +chr#176 + + + + +chr#177 + + + + +chr#178 + + + + +chr#179 + + + + +chr#180 + + + + +chr#181 + + + + +chr#182 + + + + +chr#183 + + + + +chr#184 + + + + + +chr#185 + + + + + +chr#186 + + + + + +chr#187 + + + + +chr#188 + + + + + +chr#189 + + + + +chr#190 + + + + + +chr#191 + + + + + +chr#192 + + + + + +chr#193 + + + + + +chr#194 + + + + + +chr#195 + + + + + +chr#196 + + + + + +chr#197 + + + + + +chr#198 + + + + + +chr#199 + + + + + +chr#200 + + + + + +chr#201 + + + + + +chr#202 + + + + + +chr#203 + + + + + +chr#204 + + + + + +chr#205 + + + + + +chr#206 + + + + + +chr#207 + + + + + +chr#208 + + + + + +chr#209 + + + + + +chr#210 + + + + + +chr#211 + + + + + +chr#212 + + + + + +chr#213 + + + + + +chr#214 + + + + + +chr#215 + + + + + +chr#216 + + + + + +chr#217 + + + + + +chr#218 + + + + + +chr#219 + + + + + +chr#220 + + + + + +chr#221 + + + + + +chr#222 + + + + + +chr#223 + + + + + +chr#224 + + + + + +chr#225 + + + + + +chr#226 + + + + + +chr#227 + + + + + +chr#228 + + + + + +chr#229 + + + + + +chr#230 + + + + + +chr#231 + + + + + +chr#232 + + + + + +chr#233 + + + + + +chr#234 + + + + + +chr#235 + + + + + +chr#236 + + + + + +chr#237 + + + + + +chr#238 + + + + + +chr#239 + + + + + +chr#240 + + + + + +chr#241 + + + + + +chr#242 + + + + + +chr#243 + + + + + +chr#244 + + + + + +chr#245 + + + + + +chr#246 + + + + + +chr#247 + + + + + +chr#248 + + + + + +chr#249 + + + + + +chr#250 + + + + + +chr#251 + + + + + +chr#252 + + + + + +chr#253 + + + + + +chr#254 + + + + + +chr#255 + diff --git a/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-char.sql.out b/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-char.sql.out new file mode 100644 index 0000000..eb62e52 --- /dev/null +++ b/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-char.sql.out @@ -0,0 +1,54 @@ + abbrev | name_en | name_gr +--------+----------------------+-------------------------------------------------------------- + ID | Idaho | + IA | Iowa | + AL | Alabama | + AK | Alaska | + AZ | Arizona | + AR | Arkansas | + VT | Vermont | + VA | Virginia | + NC | North Carolina | + ND | North Dakota | + FL | Florida | + IL | Illinois | + IN | Indiana | + CA | California | + KY | Kentucky | + CO | Colorado | + CT | Connecticut | + KA | Kansas | + LA | Louisiana | + MA | Massachusetts | + MD | Maryland | + MN | Minnesota | + MS | Mississippi | + MO | Missouri | + MT | Montana | + ME | Maine | + MI | Michigan | + NV | Nevada | + NE | Nebraska | + DE | Delaware | + NJ | New Jersey | + NY | New York | + NH | New Hampshire | + NM | New Mexico | + SC | South Carolina | + SD | South Dakota | + OH | Ohio | + OK | Oklahoma | + OR | Oregon | + PA | Pennsylvania | + TN | Tennessee | + GA | Georgia | + TX | Texas | + UT | Utah | + WY | Wyoming | + WV | West Virginia | + WI | Wisconsin | + WA | Washington | + DC | Washington DC | + RI | Rhode Island | +(50 rows) + diff --git a/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-select.sql.out b/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-select.sql.out new file mode 100644 index 0000000..abfce69 --- /dev/null +++ b/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-select.sql.out @@ -0,0 +1,10 @@ + abbrev | name_en | name_gr +--------+----------------------+-------------------- + UT | Utah | + WY | Wyoming | + WV | West Virginia | + WI | Wisconsin | + WA | Washington | + DC | Washington DC | +(6 rows) + diff --git a/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-sort.out b/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-sort.out new file mode 100644 index 0000000..ef9b699 --- /dev/null +++ b/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-sort.out @@ -0,0 +1,7 @@ +Bording +Sorting +hoarding + + + + diff --git a/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-text.sql.out b/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-text.sql.out new file mode 100644 index 0000000..0a128a7 --- /dev/null +++ b/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-text.sql.out @@ -0,0 +1,54 @@ + abbrev | name_en | name_gr +--------+----------------------+-------------------- + ID | Idaho | + IA | Iowa | + AL | Alabama | + AK | Alaska | + AZ | Arizona | + AR | Arkansas | + VT | Vermont | + VA | Virginia | + NC | North Carolina | + ND | North Dakota | + FL | Florida | + IL | Illinois | + IN | Indiana | + CA | California | + KY | Kentucky | + CO | Colorado | + CT | Connecticut | + KA | Kansas | + LA | Louisiana | + MA | Massachusetts | + MD | Maryland | + MN | Minnesota | + MS | Mississippi | + MO | Missouri | + MT | Montana | + ME | Maine | + MI | Michigan | + NV | Nevada | + NE | Nebraska | + DE | Delaware | + NJ | New Jersey | + NY | New York | + NH | New Hampshire | + NM | New Mexico | + SC | South Carolina | + SD | South Dakota | + OH | Ohio | + OK | Oklahoma | + OR | Oregon | + PA | Pennsylvania | + TN | Tennessee | + GA | Georgia | + TX | Texas | + UT | Utah | + WY | Wyoming | + WV | West Virginia | + WI | Wisconsin | + WA | Washington | + DC | Washington DC | + RI | Rhode Island | +(50 rows) + diff --git a/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-varchar.sql.out b/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-varchar.sql.out new file mode 100644 index 0000000..0a128a7 --- /dev/null +++ b/src/test/locale/gr_GR.ISO8859-7/expected/test-gr-varchar.sql.out @@ -0,0 +1,54 @@ + abbrev | name_en | name_gr +--------+----------------------+-------------------- + ID | Idaho | + IA | Iowa | + AL | Alabama | + AK | Alaska | + AZ | Arizona | + AR | Arkansas | + VT | Vermont | + VA | Virginia | + NC | North Carolina | + ND | North Dakota | + FL | Florida | + IL | Illinois | + IN | Indiana | + CA | California | + KY | Kentucky | + CO | Colorado | + CT | Connecticut | + KA | Kansas | + LA | Louisiana | + MA | Massachusetts | + MD | Maryland | + MN | Minnesota | + MS | Mississippi | + MO | Missouri | + MT | Montana | + ME | Maine | + MI | Michigan | + NV | Nevada | + NE | Nebraska | + DE | Delaware | + NJ | New Jersey | + NY | New York | + NH | New Hampshire | + NM | New Mexico | + SC | South Carolina | + SD | South Dakota | + OH | Ohio | + OK | Oklahoma | + OR | Oregon | + PA | Pennsylvania | + TN | Tennessee | + GA | Georgia | + TX | Texas | + UT | Utah | + WY | Wyoming | + WV | West Virginia | + WI | Wisconsin | + WA | Washington | + DC | Washington DC | + RI | Rhode Island | +(50 rows) + diff --git a/src/test/locale/gr_GR.ISO8859-7/runall b/src/test/locale/gr_GR.ISO8859-7/runall new file mode 100755 index 0000000..4db3374 --- /dev/null +++ b/src/test/locale/gr_GR.ISO8859-7/runall @@ -0,0 +1,49 @@ +#! /bin/sh + +PATH=..:$PATH + +echo "Testing PostgreSQL compilation..." + +LC_CTYPE=gr_GR.ISO8859-7 +LC_COLLATE=$LC_CTYPE +export LC_CTYPE LC_COLLATE + +echo "Testing LC_CTYPE..." +if ! test-ctype > gr-ctype.out; then + exit 1 +fi +diff expected/gr-ctype.out gr-ctype.out + +echo "Testing LC_COLLATE..." +perl ../sort-test.pl test-gr-sort.in > test-gr-sort.out +diff expected/test-gr-sort.out test-gr-sort.out + +### If you have Python - uncomment the following two lines +#python ../sort-test.py test-gr-sort.in > test-gr-sort.out +#diff expected/test-gr-sort.out test-gr-sort.out + + +abort() { + [ "$1" ] && echo "$*" + exit 1 +} + +for f in char varchar text; do + if echo $f | grep -q char; then + ftype="$f(60)" + else + ftype="$f" + fi + echo "Testing PgSQL: sort on $ftype type..." + + dropdb testlocale >/dev/null 2>&1 + createdb testlocale || abort "createdb failed" + psql -X -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_gr $ftype);" >/dev/null 2>&1 || abort "createtable failed" + psql -X testlocale < test-gr.sql.in > test-gr-$f.sql.out 2>/dev/null || abort "test query failed" + diff expected/test-gr-$f.sql.out test-gr-$f.sql.out +done +echo "Testing PgSQL: select on regexp..." +psql -X testlocale < test-gr-select.sql.in > test-gr-select.sql.out 2>/dev/null || abort "select query failed" +diff expected/test-gr-select.sql.out test-gr-select.sql.out +dropdb testlocale || abort "dropdb failed" +echo "Finished." diff --git a/src/test/locale/gr_GR.ISO8859-7/test-gr-select.sql.in b/src/test/locale/gr_GR.ISO8859-7/test-gr-select.sql.in new file mode 100644 index 0000000..e22349c --- /dev/null +++ b/src/test/locale/gr_GR.ISO8859-7/test-gr-select.sql.in @@ -0,0 +1 @@ +SELECT * FROM usastates WHERE name_gr ~* '^.*' ORDER BY name_gr; diff --git a/src/test/locale/gr_GR.ISO8859-7/test-gr-sort.in b/src/test/locale/gr_GR.ISO8859-7/test-gr-sort.in new file mode 100644 index 0000000..248f0fa --- /dev/null +++ b/src/test/locale/gr_GR.ISO8859-7/test-gr-sort.in @@ -0,0 +1,7 @@ +Sorting + + + + +Bording +hoarding diff --git a/src/test/locale/gr_GR.ISO8859-7/test-gr.sql.in b/src/test/locale/gr_GR.ISO8859-7/test-gr.sql.in new file mode 100644 index 0000000..781f4ef --- /dev/null +++ b/src/test/locale/gr_GR.ISO8859-7/test-gr.sql.in @@ -0,0 +1,53 @@ +COPY usastates FROM stdin WITH DELIMITER '|'; +AK|Alaska | +WA|Washington | +OR|Oregon | +CA|California | +NV|Nevada | +ID|Idaho | +UT|Utah | +AZ|Arizona | +MT|Montana | +WY|Wyoming | +CO|Colorado | +NM|New Mexico | +ND|North Dakota | +SD|South Dakota | +NE|Nebraska | +KA|Kansas | +OK|Oklahoma | +TX|Texas | +MN|Minnesota | +IA|Iowa | +MO|Missouri | +AR|Arkansas | +LA|Louisiana | +WI|Wisconsin | +IL|Illinois | +IN|Indiana | +MS|Mississippi | +AL|Alabama | +MI|Michigan | +OH|Ohio | +KY|Kentucky | +TN|Tennessee | +GA|Georgia | +FL|Florida | +PA|Pennsylvania | +WV|West Virginia | +VA|Virginia | +NC|North Carolina| +SC|South Carolina| +NY|New York | +NJ|New Jersey | +DE|Delaware | +MD|Maryland | +DC|Washington DC | +VT|Vermont | +MA|Massachusetts | +CT|Connecticut | +ME|Maine | +NH|New Hampshire | +RI|Rhode Island | +\. +SELECT * FROM usastates ORDER BY name_gr; |