From 4920687c27b509675a3e4524050f4e286770a7eb Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 27 Jun 2014 21:31:07 -0400 Subject: [PATCH] Add a new JFile test case and update the shelltest script. --- test/shell/import-duplicates.test | 6 +++--- test/xml/jfilexml-missing-fields.xml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 test/xml/jfilexml-missing-fields.xml diff --git a/test/shell/import-duplicates.test b/test/shell/import-duplicates.test index 7dac44f..20f6d34 100644 --- a/test/shell/import-duplicates.test +++ b/test/shell/import-duplicates.test @@ -15,15 +15,15 @@ rm -f shelltest.sqlite3 # Heartbeat.xml that doesn't really count. find ./test/xml -maxdepth 1 -name '*.xml' | wc -l >>> -18 +19 >>>= 0 # Run the imports again; we should get complaints about the duplicate -# xml_file_ids. There are 2 errors for each violation, so we expect 2*17 +# xml_file_ids. There are 2 errors for each violation, so we expect 2*18 # occurrences of the string 'ERROR'. ./dist/build/htsn-import/htsn-import -c 'shelltest.sqlite3' test/xml/*.xml 2>&1 | grep ERROR | wc -l >>> -34 +36 >>>= 0 # Finally, clean up after ourselves. diff --git a/test/xml/jfilexml-missing-fields.xml b/test/xml/jfilexml-missing-fields.xml new file mode 100644 index 0000000..55cf283 --- /dev/null +++ b/test/xml/jfilexml-missing-fields.xml @@ -0,0 +1 @@ + 21174345 BC-BQJ JFILE MINORBASE 74715 74715 Regular 05/26/2014 12:00 PM Myrtle Beach 4 1 FINAL 72002 72002 Regular 05/26/2014 02:00 PM Bowie Harrisburg 11 2 Bottom 6 Inning 76639 76639 Regular 05/26/2014 11:30 AM Round Rock Omaha 4 2 FINAL 75876 75876 Regular 05/26/2014 12:05 PM Lehigh Valley Norfolk 5 4 FINAL 71719 71719 Regular 05/26/2014 12:05 PM Trenton Richmond 13 9 FINAL 76527 76527 Regular 05/26/2014 12:05 PM Frederick Wilmington 6 3 FINAL 71225 71225 Regular 05/26/2014 01:05 PM New Britain Binghamton 0 5 FINAL 75241 75241 Regular 05/26/2014 01:05 PM Colorado Springs Iowa 3 12 FINAL 71931 71931 Regular 05/26/2014 01:05 PM Reading Akron 0 9 FINAL 76279 76279 Regular 05/26/2014 01:05 PM Syracuse Rochester 3 9 Bottom 7 Inning 77370 77370 Regular 05/26/2014 01:00 PM Potomac Salem 4 10 Top 7 Inning 71366 71366 Regular 05/26/2014 01:35 PM Portland-AA New Hampshire 6 3 FINAL 71860 71860 Regular 05/26/2014 01:35 PM Altoona Erie 3 2 Top 9 Inning 72567 72567 Regular 05/26/2014 02:05 PM Corpus Christi Northwest Arkansas 4 2 Top 6 Inning 76327 76327 Regular 05/26/2014 02:00 PM Nashville New Orleans 0 3 Top 8 Inning 75881 75881 Regular 05/26/2014 02:05 PM Oklahoma City Memphis 6 0 Top 7 Inning 75508 75508 Regular 05/26/2014 03:05 PM Sacramento Las Vegas 3 3 Top 3 Inning 72287 72287 Regular 05/26/2014 03:00 PM Tulsa Midland 3 0 Bottom 3 Inning 72217 72217 Regular 05/26/2014 03:05 PM Springfield Frisco 1 0 Bottom 3 Inning 77326 77326 Regular 05/26/2014 03:05 PM Fresno Salt Lake 6 2 Bottom 2 Inning 72497 72497 Regular 05/26/2014 03:10 PM San Antonio Arkansas 3 0 Bottom 3 Inning 74415 74415 Regular 05/26/2014 03:35 PM Reno Albuquerque 0 0 Bottom 1 Inning May 26, 2014, at 04:08 PM ET \ No newline at end of file -- 2.43.2