| 1 |
Description: fixes path to msort for regression tests |
| 2 |
Author: Bartosz Fenski <[email protected]> |
| 3 |
Forwarded: not-yet |
| 4 |
|
| 5 |
--- msort-8.53.orig/RegressionTests/RunTests.sh |
| 6 |
+++ msort-8.53/RegressionTests/RunTests.sh |
| 7 |
@@ -1,44 +1,44 @@ |
| 8 |
#!/bin/bash |
| 9 |
#This tests comparison of angles |
| 10 |
|
| 11 |
+../msort -j -q -l -w -c a < AngleTest01.data > AngleTest01.result |
| 12 |
echo -n "AngleTest01 " >> TestResults; |
| 13 |
if cmp -s AngleTest01.result AngleTest01.norm |
| 14 |
then echo "PASSED" >> TestResults; |
| 15 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 16 |
fi |
| 17 |
#This tests case-folding in the ASCII range |
| 18 |
|
| 19 |
+../msort -j -q -l -w -C < CaseFoldingTest01.data > CaseFoldingTest01.result |
| 20 |
echo -n "CaseFoldingTest01 " >> TestResults; |
| 21 |
if cmp -s CaseFoldingTest01.result CaseFoldingTest01.norm |
| 22 |
then echo "PASSED" >> TestResults; |
| 23 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 24 |
fi |
| 25 |
#This tests case-folding in the Armenian range |
| 26 |
|
| 27 |
+../msort -j -q -l -w -C < CaseFoldingTest02.data > CaseFoldingTest02.result |
| 28 |
echo -n "CaseFoldingTest02 " >> TestResults; |
| 29 |
if cmp -s CaseFoldingTest02.result CaseFoldingTest02.norm |
| 30 |
then echo "PASSED" >> TestResults; |
| 31 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 32 |
fi |
| 33 |
|
| 34 |
+../msort -j -q -B -l -d \t -e 13,13 -c l -e 9,12 -c n < CharacterRangeTest01.data > CharacterRangeTest01.result |
| 35 |
echo -n "CharacterRangeTest01 " >> TestResults; |
| 36 |
if cmp -s CharacterRangeTest01.result CharacterRangeTest01.norm |
| 37 |
then echo "PASSED" >> TestResults; |
| 38 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 39 |
fi |
| 40 |
|
| 41 |
+../msort -j -q -B -l -d \t -e 9,12 -c n -e 13,13 -c l < CharacterRangeTest02.data > CharacterRangeTest02.result |
| 42 |
echo -n "CharacterRangeTest02 " >> TestResults; |
| 43 |
if cmp -s CharacterRangeTest02.result CharacterRangeTest02.norm |
| 44 |
then echo "PASSED" >> TestResults; |
| 45 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 46 |
fi |
| 47 |
|
| 48 |
+../msort -j -q -B -l -d \t -e 13,13 -c l -i -e 1,8 -c l < CharacterRangeTest03.data > CharacterRangeTest03.result |
| 49 |
echo -n "CharacterRangeTest03 " >> TestResults; |
| 50 |
if cmp -s CharacterRangeTest03.result CharacterRangeTest03.norm |
| 51 |
then echo "PASSED" >> TestResults; |
| 52 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 53 |
fi |
| 54 |
|
| 55 |
+../msort -j -q -I -B -l -d \t -e 13,13 -c l -i -e 1,8 -c l < CharacterRangeTest04.data > CharacterRangeTest04.result |
| 56 |
echo -n "CharacterRangeTest04 " >> TestResults; |
| 57 |
if cmp -s CharacterRangeTest04.result CharacterRangeTest04.norm |
| 58 |
then echo "PASSED" >> TestResults; |
| 59 |
@@ -46,11 +46,11 @@ else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m |
| 60 |
fi |
| 61 |
#This tests the check only option. |
| 62 |
echo -n "CheckOnlyTest01 " >> TestResults; |
| 63 |
|
| 64 |
+../msort -j -q -l -w -c n -Q < CheckOnlyTest01A.data > CheckOnlyTest01A.result |
| 65 |
rstat1=$? |
| 66 |
cmp -s CheckOnlyTest01A.result CheckOnlyTest01.norm |
| 67 |
cstat1=$? |
| 68 |
|
| 69 |
+../msort -j -q -l -w -c n -Q < CheckOnlyTest01B.data > CheckOnlyTest01B.result |
| 70 |
rstat2=$? |
| 71 |
cmp -s CheckOnlyTest01B.result CheckOnlyTest01.norm |
| 72 |
cstat2=$? |
| 73 |
@@ -59,35 +59,35 @@ then echo "PASSED" >> TestResults; |
| 74 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 75 |
fi |
| 76 |
#This tests straight ASCII collating sequences. |
| 77 |
|
| 78 |
+../msort -j -q -l -w -s CollatingSequenceTest01.ord < CollatingSequenceTest01.data > CollatingSequenceTest01.result |
| 79 |
echo -n "CollatingSequenceTest01 " >> TestResults; |
| 80 |
if cmp -s CollatingSequenceTest01.result CollatingSequenceTest01.norm |
| 81 |
then echo "PASSED" >> TestResults; |
| 82 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 83 |
fi |
| 84 |
#This tests collating sequences containing non-ASCII characters. |
| 85 |
|
| 86 |
+../msort -j -q -l -w -s CollatingSequenceTest02.ord < CollatingSequenceTest02.data > CollatingSequenceTest02.result |
| 87 |
echo -n "CollatingSequenceTest02 " >> TestResults; |
| 88 |
if cmp -s CollatingSequenceTest02.result CollatingSequenceTest02.norm |
| 89 |
then echo "PASSED" >> TestResults; |
| 90 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 91 |
fi |
| 92 |
#This tests collating sequences containing non-ASCII characters and octal escapes. |
| 93 |
|
| 94 |
+../msort -j -q -l -w -s CollatingSequenceTest03.ord < CollatingSequenceTest03.data > CollatingSequenceTest03.result |
| 95 |
echo -n "CollatingSequenceTest03 " >> TestResults; |
| 96 |
if cmp -s CollatingSequenceTest03.result CollatingSequenceTest03.norm |
| 97 |
then echo "PASSED" >> TestResults; |
| 98 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 99 |
fi |
| 100 |
#This tests stripping of both diacritics and enclosures. |
| 101 |
|
| 102 |
+../msort -j -q -l -w -T ed < ComboStrippingTest01.data > ComboStrippingTest01.result |
| 103 |
echo -n "ComboStrippingTest01 " >> TestResults; |
| 104 |
if cmp -s ComboStrippingTest01.result ComboStrippingTest01.norm |
| 105 |
then echo "PASSED" >> TestResults; |
| 106 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 107 |
fi |
| 108 |
#This tests the interpretation of dates in which the month may be non-numerical. |
| 109 |
|
| 110 |
+../msort -j -q -l -w -c d < DateTest01.data > DateTest01.result |
| 111 |
echo -n "DateTest01 " >> TestResults; |
| 112 |
if cmp -s DateTest01.result DateTest01.norm |
| 113 |
then echo "PASSED" >> TestResults; |
| 114 |
@@ -95,249 +95,249 @@ else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m |
| 115 |
fi |
| 116 |
#This tests the interpretation of dates in which the month may be non-numerical |
| 117 |
#and the order of month names is specified in a sort order file. |
| 118 |
|
| 119 |
+../msort -j -q -l -w -c d -s FrenchMonths.ord < DateTest02.data > DateTest02.result |
| 120 |
echo -n "DateTest02 " >> TestResults; |
| 121 |
if cmp -s DateTest02.result DateTest02.norm |
| 122 |
then echo "PASSED" >> TestResults; |
| 123 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 124 |
fi |
| 125 |
#This tests the interpretation of dates using non-Western (Gurmukhi) numerals. |
| 126 |
|
| 127 |
+../msort -j -q -l -w -c d < DateTest03.data > DateTest03.result |
| 128 |
echo -n "DateTest03 " >> TestResults; |
| 129 |
if cmp -s DateTest03.result DateTest03.norm |
| 130 |
then echo "PASSED" >> TestResults; |
| 131 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 132 |
fi |
| 133 |
#This tests the interpretation of dates whose format is specified on the command line. |
| 134 |
|
| 135 |
+../msort -j -q -l -w -c d -f m/d/y < DateTest04.data > DateTest04.result |
| 136 |
echo -n "DateTest04 " >> TestResults; |
| 137 |
if cmp -s DateTest04.result DateTest04.norm |
| 138 |
then echo "PASSED" >> TestResults; |
| 139 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 140 |
fi |
| 141 |
#This tests the interpretation of day-of-year dates using non-Western (Gurmukhi) numerals. |
| 142 |
|
| 143 |
+../msort -j -q -l -w -c d -f y-d < DateTest05.data > DateTest05.result |
| 144 |
echo -n "DateTest05 " >> TestResults; |
| 145 |
if cmp -s DateTest05.result DateTest05.norm |
| 146 |
then echo "PASSED" >> TestResults; |
| 147 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 148 |
fi |
| 149 |
#This tests diacritic stripping |
| 150 |
|
| 151 |
+../msort -j -q -l -w -T d < DiacriticStrippingTest01.data > DiacriticStrippingTest01.result |
| 152 |
echo -n "DiacriticStrippingTest01 " >> TestResults; |
| 153 |
if cmp -s DiacriticStrippingTest01.result DiacriticStrippingTest01.norm |
| 154 |
then echo "PASSED" >> TestResults; |
| 155 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 156 |
fi |
| 157 |
|
| 158 |
+../msort -j -q -l -n 1 -c D < DomainNameTest01.data > DomainNameTest01.result |
| 159 |
echo -n "DomainNameTest01 " >> TestResults; |
| 160 |
if cmp -s DomainNameTest01.norm DomainNameTest01.result; |
| 161 |
then echo "PASSED" >> TestResults; |
| 162 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 163 |
fi |
| 164 |
|
| 165 |
+../msort -j -q -l -n 1 -c D < EmailAddressTest01.data > EmailAddressTest01.result |
| 166 |
echo -n "EmailAddressTest01 " >> TestResults; |
| 167 |
if cmp -s EmailAddressTest01.norm EmailAddressTest01.result; |
| 168 |
then echo "PASSED" >> TestResults; |
| 169 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 170 |
fi |
| 171 |
#This tests conversion of enclosed characters to their unenclosed counterparts. |
| 172 |
|
| 173 |
+../msort -j -q -l -w -T e < EnclosureStrippingTest01.data > EnclosureStrippingTest01.result |
| 174 |
echo -n "EnclosureStrippingTest01 " >> TestResults; |
| 175 |
if cmp -s EnclosureStrippingTest01.norm EnclosureStrippingTest01.result; |
| 176 |
then echo "PASSED" >> TestResults; |
| 177 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 178 |
fi |
| 179 |
#This tests exclusions specified on the command line |
| 180 |
|
| 181 |
+../msort -j -q -l -w -c n -X '$C' < ExclusionCLITest01.data > ExclusionCLITest01.result |
| 182 |
echo -n "ExclusionCLITest01 " >> TestResults; |
| 183 |
if cmp -s ExclusionCLITest01.norm ExclusionCLITest01.result; |
| 184 |
then echo "PASSED" >> TestResults; |
| 185 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 186 |
fi |
| 187 |
#This tests exclusions specified in a file |
| 188 |
|
| 189 |
+../msort -j -q -l -w -c n -x ExclusionFileTest01.exc < ExclusionFileTest01.data > ExclusionFileTest01.result |
| 190 |
echo -n "ExclusionFileTest01 " >> TestResults; |
| 191 |
if cmp -s ExclusionCLITest01.norm ExclusionCLITest01.result; |
| 192 |
then echo "PASSED" >> TestResults; |
| 193 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 194 |
fi |
| 195 |
|
| 196 |
+../msort -j -q -l -n 1 -a M -A < FirstCharOnlyTest01.data > FirstCharOnlyTest01.result |
| 197 |
echo -n "FirstCharOnlyTest01 " >> TestResults; |
| 198 |
if cmp -s FirstCharOnlyTest01.norm FirstCharOnlyTest01.result; |
| 199 |
then echo "PASSED" >> TestResults; |
| 200 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 201 |
fi |
| 202 |
#This tests parsing into fixed size records. |
| 203 |
|
| 204 |
+../msort -j -q -O 36 -e 32,35 -c n < FixedSizeRecordTest01.data > FixedSizeRecordTest01.result |
| 205 |
echo -n "FixedSizeRecordTest01 " >> TestResults; |
| 206 |
if cmp -s FixedSizeRecordTest01.norm FixedSizeRecordTest01.result; |
| 207 |
then echo "PASSED" >> TestResults; |
| 208 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 209 |
fi |
| 210 |
#This tests global inversion. |
| 211 |
|
| 212 |
+../msort -j -q -l -w -I < GlobalInversionTest01.data > GlobalInversionTest01.result |
| 213 |
echo -n "GlobalInversionTest01 " >> TestResults; |
| 214 |
if cmp -s GlobalInversionTest01.result GlobalInversionTest01.norm |
| 215 |
then echo "PASSED" >> TestResults; |
| 216 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 217 |
fi |
| 218 |
#This tests hybrid (lexical/numeric) comparison. |
| 219 |
|
| 220 |
+../msort -j -q -l -w -c h < HybridComparisonTest01.data > HybridComparisonTest01.result |
| 221 |
echo -n "HybridComparisonTest01 " >> TestResults; |
| 222 |
if cmp -s HybridComparisonTest01.result HybridComparisonTest01.norm |
| 223 |
then echo "PASSED" >> TestResults; |
| 224 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 225 |
fi |
| 226 |
#This tests the command line flags for specifying input and output files. |
| 227 |
|
| 228 |
+../msort -j -q -l -w -1 IOFlagTest01.data -2 IOFlagTest01.result |
| 229 |
echo -n "IOFlagTest01 " >> TestResults; |
| 230 |
if cmp -s IOFlagTest01.result IOFlagTest01.norm |
| 231 |
then echo "PASSED" >> TestResults; |
| 232 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 233 |
fi |
| 234 |
#This tests the interpretation of ISO8601 date/time stamps without time zone offsets. |
| 235 |
|
| 236 |
+../msort -j -q -l -w -c i < ISO8601DateTimeTest01.data > ISO8601DateTimeTest01.result |
| 237 |
echo -n "ISO8601DateTimeTest01 " >> TestResults; |
| 238 |
if cmp -s ISO8601DateTimeTest01.result ISO8601DateTimeTest01.norm |
| 239 |
then echo "PASSED" >> TestResults; |
| 240 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 241 |
fi |
| 242 |
#This tests the interpretation of ISO8601 date/time stamps with time zone offsets. |
| 243 |
|
| 244 |
+../msort -j -q -l -w -c i < ISO8601DateTimeTest02.data > ISO8601DateTimeTest02.result |
| 245 |
echo -n "ISO8601DateTimeTest02 " >> TestResults; |
| 246 |
if cmp -s ISO8601DateTimeTest02.result ISO8601DateTimeTest02.norm |
| 247 |
then echo "PASSED" >> TestResults; |
| 248 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 249 |
fi |
| 250 |
#This tests the interpretation of ISO8601 date/time stamps with a leading sign. |
| 251 |
|
| 252 |
+../msort -j -q -l -w -c i < ISO8601DateTimeTest03.data > ISO8601DateTimeTest03.result |
| 253 |
echo -n "ISO8601DateTimeTest03 " >> TestResults; |
| 254 |
if cmp -s ISO8601DateTimeTest03.result ISO8601DateTimeTest03.norm |
| 255 |
then echo "PASSED" >> TestResults; |
| 256 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 257 |
fi |
| 258 |
#This tests handling of input data with CR rather than LF as line terminator. |
| 259 |
|
| 260 |
+../msort -j -q -l -m -w < LineEndTest01.data > LineEndTest01.result |
| 261 |
echo -n "LineEndTest01 " >> TestResults; |
| 262 |
if cmp -s LineEndTest01.result LineEndTest01.norm |
| 263 |
then echo "PASSED" >> TestResults; |
| 264 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 265 |
fi |
| 266 |
#This tests local inversion with a single key. |
| 267 |
|
| 268 |
+../msort -j -q -l -w -i < LocalInversionTest01.data > LocalInversionTest01.result |
| 269 |
echo -n "LocalInversionTest01 " >> TestResults; |
| 270 |
if cmp -s LocalInversionTest01.result LocalInversionTest01.norm |
| 271 |
then echo "PASSED" >> TestResults; |
| 272 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 273 |
fi |
| 274 |
#This tests local inversion with two keys. |
| 275 |
|
| 276 |
+../msort -j -q -l -n 2 -c n -i -n 1 < LocalInversionTest02.data > LocalInversionTest02.result |
| 277 |
echo -n "LocalInversionTest02 " >> TestResults; |
| 278 |
if cmp -s LocalInversionTest02.result LocalInversionTest02.norm |
| 279 |
then echo "PASSED" >> TestResults; |
| 280 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 281 |
fi |
| 282 |
#This tests handling of input lines thousands of lines longs |
| 283 |
|
| 284 |
+../msort -j -q -l -w < LongLineTest01.data > LongLineTest01.result |
| 285 |
echo -n "LongLineTest01 " >> TestResults; |
| 286 |
if cmp -s LongLineTest01.result LongLineTest01.norm |
| 287 |
then echo "PASSED" >> TestResults; |
| 288 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 289 |
fi |
| 290 |
#This tests month name sorting using an order defined in a file. |
| 291 |
|
| 292 |
+../msort -j -q -l -n 1 -c m -s MonthNameTest02.ord -n 2 -c n < MonthNameTest02.data > MonthNameTest02.result |
| 293 |
echo -n "MonthNameTest02 " >> TestResults; |
| 294 |
if cmp -s MonthNameTest02.result MonthNameTest02.norm |
| 295 |
then echo "PASSED" >> TestResults; |
| 296 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 297 |
fi |
| 298 |
#This tests the ability to sort on non-Western numerals (Old Persian) |
| 299 |
|
| 300 |
+../msort -j -q -l -w -c n -y Old_Persian < NumberTest01.data > NumberTest01.result |
| 301 |
echo -n "NumberTest01 " >> TestResults; |
| 302 |
if cmp -s NumberTest01.result NumberTest01.norm |
| 303 |
then echo "PASSED" >> TestResults; |
| 304 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 305 |
fi |
| 306 |
#This tests the ability to sort on numbers using different numeral systems in different fields. |
| 307 |
|
| 308 |
+../msort -j -q -l -n 2 -c n -y Chinese -n 1 -c n -y Devanagari < NumberTest02.data > NumberTest02.result |
| 309 |
echo -n "NumberTest02 " >> TestResults; |
| 310 |
if cmp -s NumberTest02.result NumberTest02.norm |
| 311 |
then echo "PASSED" >> TestResults; |
| 312 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 313 |
fi |
| 314 |
#This tests the ability to sort on non-Western numbers (Roman numerals) |
| 315 |
|
| 316 |
+../msort -j -q -l -w -c n -y Roman < NumberTest03.data > NumberTest03.result |
| 317 |
echo -n "NumberTest03 " >> TestResults; |
| 318 |
if cmp -s NumberTest03.result NumberTest03.norm |
| 319 |
then echo "PASSED" >> TestResults; |
| 320 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 321 |
fi |
| 322 |
#This tests the ability to sort on numbers in a bunch of different numeral systems |
| 323 |
|
| 324 |
+../msort -j -q -l -w -c n -y all < NumberTest04.data > NumberTest04.result |
| 325 |
echo -n "NumberTest04 " >> TestResults; |
| 326 |
if cmp -s NumberTest04.result NumberTest04.norm |
| 327 |
then echo "PASSED" >> TestResults; |
| 328 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 329 |
fi |
| 330 |
#This tests the ability to sort on numeric strings using non-Western numerals (Gurmukhi) |
| 331 |
|
| 332 |
+../msort -j -q -l -w -c N -y Gurmukhi < NumericStringTest01.data > NumericStringTest01.result |
| 333 |
echo -n "NumericStringTest01 " >> TestResults; |
| 334 |
if cmp -s NumericStringTest01.result NumericStringTest01.norm |
| 335 |
then echo "PASSED" >> TestResults; |
| 336 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 337 |
fi |
| 338 |
#This tests the handling of optional tagged fields where the key is entirely absent. |
| 339 |
|
| 340 |
+../msort -j -q -b -t '%P:' -o g < OptionalFieldTest01.data > OptionalFieldTest01.result |
| 341 |
echo -n "OptionalFieldTest01 " >> TestResults; |
| 342 |
if cmp -s OptionalFieldTest01.result OptionalFieldTest01.norm |
| 343 |
then echo "PASSED" >> TestResults; |
| 344 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 345 |
fi |
| 346 |
#This tests the handling of optional tagged fields where the tag is present by has no value. |
| 347 |
|
| 348 |
+../msort -j -q -b -t '%P:' -o g < OptionalFieldTest02.data > OptionalFieldTest02.result |
| 349 |
echo -n "OptionalFieldTest02 " >> TestResults; |
| 350 |
if cmp -s OptionalFieldTest02.result OptionalFieldTest02.norm |
| 351 |
then echo "PASSED" >> TestResults; |
| 352 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 353 |
fi |
| 354 |
#This tests the handling of an optional positionally-defined field. |
| 355 |
|
| 356 |
+../msort -j -q -l -n 2 -o l -n 1 < OptionalFieldTest03.data > OptionalFieldTest03.result |
| 357 |
echo -n "OptionalFieldTest03 " >> TestResults; |
| 358 |
if cmp -s OptionalFieldTest03.result OptionalFieldTest03.norm |
| 359 |
then echo "PASSED" >> TestResults; |
| 360 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 361 |
fi |
| 362 |
#This tests a single positive field number. |
| 363 |
|
| 364 |
+../msort -j -q -l -d ':' -n 3 -c n < PositionKeyTest01.data > PositionKeyTest01.result |
| 365 |
echo -n "PositionKeyTest01 " >> TestResults; |
| 366 |
if cmp -s PositionKeyTest01.norm PositionKeyTest01.result; |
| 367 |
then echo "PASSED" >> TestResults; |
| 368 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 369 |
fi |
| 370 |
#This tests a single negative field number. |
| 371 |
|
| 372 |
+../msort -j -q -l -d ':' -n -5 -c n < PositionKeyTest01.data > PositionKeyTest02.result |
| 373 |
echo -n "PositionKeyTest02 " >> TestResults; |
| 374 |
if cmp -s PositionKeyTest02.norm PositionKeyTest02.result; |
| 375 |
then echo "PASSED" >> TestResults; |
| 376 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 377 |
fi |
| 378 |
#This tests a single positive field number with character offset |
| 379 |
|
| 380 |
+../msort -j -q -l -d ':' -n 3.2 -c n < PositionKeyTest01.data > PositionKeyTest03.result |
| 381 |
echo -n "PositionKeyTest03 " >> TestResults; |
| 382 |
if cmp -s PositionKeyTest03.norm PositionKeyTest03.result; |
| 383 |
then echo "PASSED" >> TestResults; |
| 384 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 385 |
fi |
| 386 |
#This tests a single negative field number with character offset |
| 387 |
|
| 388 |
+../msort -j -q -l -d ':' -n -5.2 -c n < PositionKeyTest01.data > PositionKeyTest04.result |
| 389 |
echo -n "PositionKeyTest04 " >> TestResults; |
| 390 |
if cmp -s PositionKeyTest04.norm PositionKeyTest04.result; |
| 391 |
then echo "PASSED" >> TestResults; |
| 392 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 393 |
fi |
| 394 |
#This tests compound conditional keys, that is, composed of two or more fields. |
| 395 |
|
| 396 |
+../msort -j -q -l -d ':' -n '1,2' -c n -X ':' < PositionKeyTest05.data > PositionKeyTest05.result |
| 397 |
echo -n "PositionKeyTest05 " >> TestResults; |
| 398 |
if cmp -s PositionKeyTest05.norm PositionKeyTest05.result; |
| 399 |
then echo "PASSED" >> TestResults; |
| 400 |
@@ -346,131 +346,131 @@ fi |
| 401 |
#This tests parsing on a specified record separator. |
| 402 |
#We set the record-separator to semi-colon and the field separator to tab |
| 403 |
#and sort numerically on the second field. |
| 404 |
|
| 405 |
+../msort -j -q -r ';' -d '\t' -n 2 -c n < RecordSeparatorTest01.data > RecordSeparatorTest01.result |
| 406 |
echo -n "RecordSeparatorTest01 " >> TestResults; |
| 407 |
if cmp -s RecordSeparatorTest01.result RecordSeparatorTest01.norm |
| 408 |
then echo "PASSED" >> TestResults; |
| 409 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 410 |
fi |
| 411 |
#This tests key reversal. |
| 412 |
|
| 413 |
+../msort -j -q -l -n 1 -R < ReversalTest01.data > ReversalTest01.result |
| 414 |
echo -n "ReversalTest01 " >> TestResults; |
| 415 |
if cmp -s ReversalTest01.result ReversalTest01.norm |
| 416 |
then echo "PASSED" >> TestResults; |
| 417 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 418 |
fi |
| 419 |
#This tests use of a sort order file with a non-default separator |
| 420 |
|
| 421 |
+../msort -j -q -l -w -W SortOrderFileSeparatorTest01.sep -s SortOrderFileSeparatorTest01.ord < SortOrderFileSeparatorTest01.data > SortOrderFileSeparatorTest01.result |
| 422 |
echo -n "SortOrderFileSeparatorTest01 " >> TestResults; |
| 423 |
if cmp -s SortOrderFileSeparatorTest01.result SortOrderFileSeparatorTest01.norm |
| 424 |
then echo "PASSED" >> TestResults; |
| 425 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 426 |
fi |
| 427 |
#This tests skipping of the first record |
| 428 |
|
| 429 |
+../msort -j -q -d '/' -t w -Z SkipFirstRecordTest01.data > SkipFirstRecordTest01.result |
| 430 |
echo -n "SkipFirstRecordTest01 " >> TestResults; |
| 431 |
if cmp -s SkipFirstRecordTest01.result SkipFirstRecordTest01.norm |
| 432 |
then echo "PASSED" >> TestResults; |
| 433 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 434 |
fi |
| 435 |
#This tests sorting on string length, with a secondary lexicographic sort. |
| 436 |
|
| 437 |
+../msort -j -q -l -n 1 -c s -n 1 < StringLengthTest01.data > StringLengthTest01.result |
| 438 |
echo -n "StringLengthTest01 " >> TestResults; |
| 439 |
if cmp -s StringLengthTest01.result StringLengthTest01.norm |
| 440 |
then echo "PASSED" >> TestResults; |
| 441 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 442 |
fi |
| 443 |
#This tests sorting on string length with multigraphs and a secondary lexicographic sort. |
| 444 |
|
| 445 |
+../msort -j -q -l -n 1 -c s -s StringLengthTest02.ord -n 1 < StringLengthTest02.data > StringLengthTest02.result |
| 446 |
echo -n "StringLengthTest02 " >> TestResults; |
| 447 |
if cmp -s StringLengthTest02.result StringLengthTest02.norm |
| 448 |
then echo "PASSED" >> TestResults; |
| 449 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 450 |
fi |
| 451 |
|
| 452 |
+../msort -j -q -l -w -T s < StylisticTest01.data > StylisticTest01.result |
| 453 |
echo -n "StylisticTest01 " >> TestResults; |
| 454 |
if cmp -s StylisticTest01.result StylisticTest01.norm |
| 455 |
then echo "PASSED" >> TestResults; |
| 456 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 457 |
fi |
| 458 |
#This tests substitions. |
| 459 |
|
| 460 |
+../msort -j -q -l -w -S SubstitutionTest01.sub < SubstitutionTest01.data > SubstitutionTest01.result |
| 461 |
echo -n "SubstitutionTest01 " >> TestResults; |
| 462 |
if cmp -s SubstitutionTest01.result SubstitutionTest01.norm |
| 463 |
then echo "PASSED" >> TestResults; |
| 464 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 465 |
fi |
| 466 |
#This tests fancy substitions. |
| 467 |
|
| 468 |
+../msort -j -q -l -w -S SubstitutionTest02.sub < SubstitutionTest02.data > SubstitutionTest02.result |
| 469 |
echo -n "SubstitutionTest02 " >> TestResults; |
| 470 |
if cmp -s SubstitutionTest02.result SubstitutionTest02.norm |
| 471 |
then echo "PASSED" >> TestResults; |
| 472 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 473 |
fi |
| 474 |
#This tests key selection by tag. |
| 475 |
|
| 476 |
+../msort -j -q -t '%M:' -t '%P:' < TaggedKeyTest01.data > TaggedKeyTest01.result |
| 477 |
echo -n "TaggedKeyTest01 " >> TestResults; |
| 478 |
if cmp -s TaggedKeyTest01.result TaggedKeyTest01.norm |
| 479 |
then echo "PASSED" >> TestResults; |
| 480 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 481 |
fi |
| 482 |
#This tests key selection by tags specified by means of a regular expression. |
| 483 |
|
| 484 |
+../msort -j -q -t '%(M|D.*|d.*):' -t '%P:' < TaggedKeyTest02.data > TaggedKeyTest02.result |
| 485 |
echo -n "TaggedKeyTest02 " >> TestResults; |
| 486 |
if cmp -s TaggedKeyTest02.result TaggedKeyTest02.norm |
| 487 |
then echo "PASSED" >> TestResults; |
| 488 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 489 |
fi |
| 490 |
#This tests the handling of empty keys, that is, fields with a tag but no value. |
| 491 |
|
| 492 |
+../msort -j -q -t '%G:' -t '%P:' < TaggedKeyTest03.data > TaggedKeyTest03.result |
| 493 |
echo -n "TaggedKeyTest03 " >> TestResults; |
| 494 |
if cmp -s TaggedKeyTest03.result TaggedKeyTest03.norm |
| 495 |
then echo "PASSED" >> TestResults; |
| 496 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 497 |
fi |
| 498 |
#This tests the interpretation of simple times, without time zone offsets |
| 499 |
|
| 500 |
+../msort -j -q -l -w -c t < TimeTest01.data > TimeTest01.result |
| 501 |
echo -n "TimeTest01 " >> TestResults; |
| 502 |
if cmp -s TimeTest01.result TimeTest01.norm |
| 503 |
then echo "PASSED" >> TestResults; |
| 504 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 505 |
fi |
| 506 |
#This tests the interpretation of times with ISO8601 time zone offsets. |
| 507 |
|
| 508 |
+../msort -j -q -l -w -c t < TimeTest02.data > TimeTest02.result |
| 509 |
echo -n "TimeTest02 " >> TestResults; |
| 510 |
if cmp -s TimeTest02.result TimeTest02.norm |
| 511 |
then echo "PASSED" >> TestResults; |
| 512 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 513 |
fi |
| 514 |
#This tests Turkic case folding |
| 515 |
|
| 516 |
+../msort -j -q -l -a m -n 1 -C -z -n 2 < TurkicCaseFoldTest.data > TurkicCaseFoldTest.result |
| 517 |
echo -n "TurkicCaseFoldTest " >> TestResults; |
| 518 |
if cmp -s TurkicCaseFoldTest.result TurkicCaseFoldTest.norm |
| 519 |
then echo "PASSED" >> TestResults; |
| 520 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 521 |
fi |
| 522 |
#This tests disabling of the default of normalization to NFC. |
| 523 |
|
| 524 |
+../msort -j -q -l -n 1 -n 2 -c n -u n < UnicodeNormalizationTest01.data > UnicodeNormalizationTest01.result |
| 525 |
echo -n "UnicodeNormalizationTest01 " >> TestResults; |
| 526 |
if cmp -s UnicodeNormalizationTest01.norm UnicodeNormalizationTest01.result; |
| 527 |
then echo "PASSED" >> TestResults; |
| 528 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 529 |
fi |
| 530 |
#This tests the default of normalization to NFC. |
| 531 |
|
| 532 |
+../msort -j -q -l -n 1 -n 2 -c n -u c < UnicodeNormalizationTest02.data > UnicodeNormalizationTest02.result |
| 533 |
echo -n "UnicodeNormalizationTest02 " >> TestResults; |
| 534 |
if cmp -s UnicodeNormalizationTest02.norm UnicodeNormalizationTest02.result; |
| 535 |
then echo "PASSED" >> TestResults; |
| 536 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 537 |
fi |
| 538 |
#This tests normalization to NFD. |
| 539 |
|
| 540 |
+../msort -j -q -l -n 1 -n 2 -c n -u d < UnicodeNormalizationTest03.data > UnicodeNormalizationTest03.result |
| 541 |
echo -n "UnicodeNormalizationTest03 " >> TestResults; |
| 542 |
if cmp -s UnicodeNormalizationTest03.norm UnicodeNormalizationTest03.result; |
| 543 |
then echo "PASSED" >> TestResults; |
| 544 |
else echo $'\x1b[1m\x1b[31mFAILED\x1b[0m' >> TestResults; |
| 545 |
fi |
| 546 |
|
| 547 |
+../msort -j -q -l -n 1 -c D < URIWithSchemeTest01.data > URIWithSchemeTest01.result |
| 548 |
echo -n "URIWithSchemeTest01 " >> TestResults; |
| 549 |
if cmp -s URIWithSchemeTest01.norm URIWithSchemeTest01.result; |
| 550 |
then echo "PASSED" >> TestResults; |