diff --git a/src/main/java/gov/nasa/pds/tools/util/PDFUtil.java b/src/main/java/gov/nasa/pds/tools/util/PDFUtil.java index a79c56fdc..5d7566feb 100644 --- a/src/main/java/gov/nasa/pds/tools/util/PDFUtil.java +++ b/src/main/java/gov/nasa/pds/tools/util/PDFUtil.java @@ -173,7 +173,7 @@ public synchronized boolean validateFileStandardConformity(String baseDir, Strin } // Build the full pathname of the PDF file. - String pdfRef = parent + File.separator + pdfBase; + String pdfRef = parent + (parent.endsWith(File.separator) ? "" : File.separator) + pdfBase; LOG.debug("validateFileStandardConformity:parent,pdfBase,pdfRef [{}],[{}],[{}]", parent, pdfBase, pdfRef); LOG.debug("validateFileStandardConformity:parent,pdfBase,pdfRef,uri [{}],[{}],[{}],{}", parent, diff --git a/src/main/java/gov/nasa/pds/tools/validate/content/table/FieldValueValidator.java b/src/main/java/gov/nasa/pds/tools/validate/content/table/FieldValueValidator.java index f0a8fed0a..729e6917e 100644 --- a/src/main/java/gov/nasa/pds/tools/validate/content/table/FieldValueValidator.java +++ b/src/main/java/gov/nasa/pds/tools/validate/content/table/FieldValueValidator.java @@ -816,7 +816,7 @@ private void checkFormat(String value, String format, int fieldIndex, RecordLoca } try { if (specifier.matches("[eE]")) { - String p = "(\\+|-)?([0-9]+(\\.[0-9]*)?|\\.[0-9]+)([Ee](\\+|-)?[0-9]+)"; + String p = "(\\+|-)?([0-9](\\.[0-9]*)?|\\.[0-9]+)([Ee](\\+|-)?[0-9]+)"; if (!value.trim().matches(p)) { throw new NumberFormatException("Value does not match pattern."); } diff --git a/src/test/resources/features/3.6.x.feature b/src/test/resources/features/3.6.x.feature index 9d83d56e5..990f1dbbf 100644 --- a/src/test/resources/features/3.6.x.feature +++ b/src/test/resources/features/3.6.x.feature @@ -11,9 +11,12 @@ Feature: Running integration tests for validate module | testName | testDir | messageCount | messageText | problemEnum | resourceDir | reportDir | commandArgs | refOutputValue | # Validate#1008 | "NASA-PDS/validate#1008 PDF on windows" | "github1008" | 1 | "1 errors expected" | "NON_PDFA_FILE" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github1008.json -s json --skip-context-validation -t {resourceDir}/github1008/example.xml" | "report_github1008.json" | + # Validate#992 + | "NASA-PDS/validate#992 pedantic notation" | "github992" | 6 | "1 errors expected, 5 warnings expected" | "FIELD_VALUE_DATA_TYPE_MISMATCH,FIELD_VALUE_FORMAT_SPECIFIER_MISMATCH,FIELD_VALUE_FORMAT_PRECISION_MISMATCH,FIELD_VALUE_TOO_LONG" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github992.1.json -s json --skip-context-validation -t {resourceDir}/github992/ff_char.xml" | "report_github992.1.json" | + | "NASA-PDS/validate#992 pedantic notation" | "github992" | 6 | "1 errors expected, 5 warnings expected" | "FIELD_VALUE_DATA_TYPE_MISMATCH,FIELD_VALUE_FORMAT_SPECIFIER_MISMATCH,FIELD_VALUE_FORMAT_PRECISION_MISMATCH,FIELD_VALUE_TOO_LONG" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github992.2.json -s json --skip-context-validation -t {resourceDir}/github992/ff_del.xml" | "report_github992.2.json" | # Validate#816 (reuse validate#681 tests) | "NASA-PDS/validate#816 Field format FAIL: ASCII table invalid precision" | "github681" | 1 | "1 errors expected" | "FIELD_VALID_FORMAT_PRECISION_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github681_2.json -s json -t {resourceDir}/github681/ff_char_fail.xml" | "report_github681_2.json" | - | "NASA-PDS/validate#816 Field format WARNING: Precision mismatch" | "github681" | 2 | "2 warnings expected" | "FIELD_VALUE_FORMAT_PRECISION_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github681_3.json -s json -t {resourceDir}/github681/ff_char_warn.xml {resourceDir}/github681/ff_del_warn.xml" | "report_github681_3.json" | + | "NASA-PDS/validate#816 Field format WARNING: Precision mismatch" | "github681" | 2 | "2 warnings expected" | "FIELD_VALUE_FORMAT_PRECISION_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github681_3.json -s json -t {resourceDir}/github681/ff_char_warn.xml {resourceDir}/github681/ff_del_warn.xml" | "report_github681_3.json" | # In .csv, Line1 good; L2,Field1=11.111 for %6.2f; L3,F2=22.22 for $4.2f; L4,F3=33333333 (no 'e') for %8.3e; L5,F4=4.4 for %3d #|"NASA-PDS/validate#816 Throw WARNING for unmatched field_format in table char" | "github816" | 5 | "1 errors expected, 4 warnings expected" | "FIELD_VALUE_FORMAT_PRECISION_MISMATCH,FIELD_VALUE_TOO_LONG,FIELD_VALUE_FORMAT_SPECIFIER_MISMATCH,FIELD_VALUE_DATA_TYPE_MISMATCH,FIELD_VALUE_FORMAT_SPECIFIER_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github816a.json -s json -t {resourceDir}/github816/ff_char.xml" | "report_github816a.json" | | "NASA-PDS/validate#816 Throw WARNING for unmatched field_format in delimited" | "github816" | 5 | "1 errors expected, 4 warnings expected" | "FIELD_VALUE_FORMAT_PRECISION_MISMATCH,FIELD_VALUE_TOO_LONG,FIELD_VALUE_FORMAT_SPECIFIER_MISMATCH,FIELD_VALUE_DATA_TYPE_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github816b.json -s json -t {resourceDir}/github816/ff_del.xml" | "report_github816b.json" | @@ -31,7 +34,7 @@ Feature: Running integration tests for validate module | "NASA-PDS/validate#831 Success high instrument saturation" | "github831" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github831.json -s json --skip-context-validation -t {resourceDir}/github831/kplo.xml" | "report_github831.json" | # validate3.4.1 WARNs that 3 values are below min even though they match other constants | "NASA-PDS/validate#831 Check specific constants before min or max constants" | "github831" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github831.json -s json -t {resourceDir}/github831/kplo.xml" | "report_github831.json" | - # Validate#837 + # Validate#837 | "NASA-PDS/validate#837 Success match out of format constants" | "github837" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github837.json -s json --skip-context-validation -t {resourceDir}/github837/times_table.xml" | "report_github837.json" | # someday line 3 in data (or line 88 of .xml) may reasonably throw an error for bad format | "NASA-PDS/validate#837 Check constants before data_type" | "github837" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github837.json -s json -t {resourceDir}/github837/x.xml" | "report_github837.json" | diff --git a/src/test/resources/features/pre.3.6.x.feature b/src/test/resources/features/pre.3.6.x.feature index e16a030c9..9bb879b1f 100644 --- a/src/test/resources/features/pre.3.6.x.feature +++ b/src/test/resources/features/pre.3.6.x.feature @@ -15,11 +15,11 @@ Scenario Outline: Execute validate command for tests below. # Validate#785 |"NASA-PDS/validate#785 Success detecting out of range values" | "github785" | 6 | "6 warnings expected" | "FIELD_VALUE_OUT_OF_SPECIAL_CONSTANT_MIN_MAX_RANGE" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github785.json -s json --skip-context-validation -t {resourceDir}/github785/00038_FGM_RTN.xml" | "report_github785.json" | -|"NASA-PDS/validate#781 file size for block area" | "github781" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github781.json -s json -skip-content-validation -t {resourceDir}/github781/RSS001E01_2031066T0241_EURGRVL20XXXXXXGSFC_COV010.xml" | "report_github781.json" | +|"NASA-PDS/validate#781 file size for block area" | "github781" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github781.json -s json --skip-context-validation --skip-context-validation -t {resourceDir}/github781/RSS001E01_2031066T0241_EURGRVL20XXXXXXGSFC_COV010.xml" | "report_github781.json" | # Validate#755 -|"NASA-PDS/validate#755 Detect and report file areas referencing same file" | "github755" | 2 | "2 errors expected" | "DUPLICATED_FILE_AREA_REFERENCE" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github755.json -s json -skip-content-validation -t {resourceDir}/github755/m221011.0013.xml {resourceDir}/github755/m221011.0014.xml {resourceDir}/github755/m221011.0015.xml {resourceDir}/github755/m221011.0030.xml" | "report_github755.json" | -|"NASA-PDS/validate#755 No common file referenced" | "github755" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github755.1.json -s json -skip-content-validation -t {resourceDir}/github755/m221011.0013.xml {resourceDir}/github755/m221011.0015.xml" | "report_github755.1.json" | +|"NASA-PDS/validate#755 Detect and report file areas referencing same file" | "github755" | 2 | "2 errors expected" | "DUPLICATED_FILE_AREA_REFERENCE" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github755.json -s json -skip-context-validation -t {resourceDir}/github755/m221011.0013.xml {resourceDir}/github755/m221011.0014.xml {resourceDir}/github755/m221011.0015.xml {resourceDir}/github755/m221011.0030.xml" | "report_github755.json" | +|"NASA-PDS/validate#755 No common file referenced" | "github755" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github755.1.json -s json -skip-context-validation -t {resourceDir}/github755/m221011.0013.xml {resourceDir}/github755/m221011.0015.xml" | "report_github755.1.json" | # Validate#754 |"NASA-PDS/validate#754 Success differentiating file area offsets" | "github754" | 0 | "1 warnings expected" | "DATA_OBJECTS_OUT_OF_ORDER" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github754.json -s json --skip-context-validation -t {resourceDir}/github754/Cassini_ISS_CB2_Jupiter_global_map_2.xml" | "report_github754.json" | @@ -51,7 +51,7 @@ Scenario Outline: Execute validate command for tests below. |"NASA-PDS/validate#671 Success processing of bundle" | "github671" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github671.json -s json --skip-context-validation -t {resourceDir}/github671 -R pds4.bundle" | "report_github671.json" | # Validate#652 -|"NASA-PDS/validate#652 Success processing of bundles and collections" | "github652" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github652.json -s json -t {resourceDir}/github652" | "report_github652.json" | +|"NASA-PDS/validate#652 Success processing of bundles and collections" | "github652" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github652.json -s json --skip-context-validation -t {resourceDir}/github652" | "report_github652.json" | # Validate#651 |"NASA-PDS/validate#651 Success processing of bit patterns" | "github651" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github651.json -s json -t {resourceDir}/github651/M1431146123CC.xml" | "report_github651.json" | @@ -94,7 +94,7 @@ Scenario Outline: Execute validate command for tests below. #|"NASA-PDS/validate#599 Failure Override Schema+Schematron" | "github599" | 1 | "1 errors expected" | "SCHEMA_ERROR" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github599_4.json -s json -S {resourceDir}/github599/PDS4_PDS_1I00.sch -x {resourceDir}/github599/PDS4_PDS_1I00.xsd -t {resourceDir}/github599/AREA_Camelot_1radii.xml" | "report_github599_4.json" | # Validate#597 -|"NASA-PDS/validate#597 Success Find Resources in Older/Skipped Bundles/Collections" | "github597" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github597_1.json -s json -R pds4.bundle -t {resourceDir}/github597" | "report_github597_1.json" | +|"NASA-PDS/validate#597 Success Find Resources in Older/Skipped Bundles/Collections" | "github597" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github597_1.json -s json --skip-context-validation -R pds4.bundle -t {resourceDir}/github597" | "report_github597_1.json" | # Validate#562 |"NASA-PDS/validate#597 Success Filename with underscores" | "github562" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github562_1.json -s json -t {resourceDir}/github562" | "report_github562_1.json" | @@ -107,22 +107,22 @@ Scenario Outline: Execute validate command for tests below. |"NASA-PDS/validate#535 Warning when excess table content" | "github535" | 1 | "1 errors expected" | "TABLE_DEFINITION_PROBLEM" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github535_2.json -s json -t {resourceDir}/github535/uvis_euv_2016_288_solar_time_series_egress.xml --complete-descriptions" | "report_github535_2.json" | # Validate#531 -|"NASA-PDS/validate#531 Success Binary Field Group Lengths" | "github531" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github531_1.json -s json -t {resourceDir}/github531/success/b.xml" | "report_github531_1.json" | -|"NASA-PDS/validate#531 Fail Binary Field Group Lengths" | "github531" | 1 | "1 errors expected" | "TABLE_DEFINITION_PROBLEM" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github531_2.json -s json -t {resourceDir}/github531/fail/b.xml" | "report_github531_2.json" | +|"NASA-PDS/validate#531 Success Binary Field Group Lengths" | "github531" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github531_1.json -s json --skip-context-validation -t {resourceDir}/github531/success/b.xml" | "report_github531_1.json" | +|"NASA-PDS/validate#531 Fail Binary Field Group Lengths" | "github531" | 1 | "1 errors expected" | "TABLE_DEFINITION_PROBLEM" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github531_2.json -s json --skip-context-validation -t {resourceDir}/github531/fail/b.xml" | "report_github531_2.json" | # Validate#529 -|"NASA-PDS/validate#529 Success Update Compare Scale" | "github529" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github529_1.json -s json -t {resourceDir}/github529/success/m0154651923f6_2p_cif_gbl.xml " | "report_github529_1.json" | +|"NASA-PDS/validate#529 Success Update Compare Scale" | "github529" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github529_1.json -s json --skip-context-validation -t {resourceDir}/github529/success/m0154651923f6_2p_cif_gbl.xml " | "report_github529_1.json" | # fixed: |"NASA-PDS/validate#529 Fail Update Compare Scale" | "github529" | 1 | "1 errors expected" | "ARRAY_VALUE_OUT_OF_MIN_MAX_RANGE" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github529_2.json -s json -t {resourceDir}/github529/fail/m0126360726f4_2p_cif_gbl.xml " | "report_github529_2.json" | # Validate#514 - binary tables should allow NaN -|"NASA-PDS/validate#514 Success Update Compare Scale" | "github514" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github514_1.json -s json -t {resourceDir}/github514/success/8array.xml" | "report_github514_1.json" | +|"NASA-PDS/validate#514 Success Update Compare Scale" | "github514" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github514_1.json -s json --skip-context-validation -t {resourceDir}/github514/success/8array.xml" | "report_github514_1.json" | # Validate#499 -|"NASA-PDS/validate#499 Success Table EOL" | "github499" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github499_1.json -s json -t {resourceDir}/github499/success/M7_217_044546_N.xml" | "report_github499_1.json" | -|"NASA-PDS/validate#499 Fail Table EOL" | "github499" | 25 | "25 errors expected" | "MISSING_CRLF" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github499_2.json -s json -t {resourceDir}/github499/fail/M7_217_044546_N.xml" | "report_github499_2.json" | +|"NASA-PDS/validate#499 Success Table EOL" | "github499" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github499_1.json -s json --skip-context-validation -t {resourceDir}/github499/success/M7_217_044546_N.xml" | "report_github499_1.json" | +|"NASA-PDS/validate#499 Fail Table EOL" | "github499" | 25 | "25 errors expected" | "MISSING_CRLF" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github499_2.json -s json --skip-context-validation -t {resourceDir}/github499/fail/M7_217_044546_N.xml" | "report_github499_2.json" | # Validate#480 -|"NASA-PDS/validate#480 Success Intermingled Data Objects" | "github480" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github480_1.json -s json -t {resourceDir}/github480/test_success.xml --skip-content-validation" | "report_github480_1.json" | +|"NASA-PDS/validate#480 Success Intermingled Data Objects" | "github480" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github480_1.json -s json --skip-context-validation -t {resourceDir}/github480/test_success.xml --skip-content-validation" | "report_github480_1.json" | |"NASA-PDS/validate#480 Fail Intermingled Data Objects - Header Offset" | "github480" | 1 | "1 errors expected" | "INVALID_OBJECT_DEFINITION" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github480_2.json -s json -t {resourceDir}/github480/test_fail_header_offset.xml --skip-content-validation" | "report_github480_2.json" | |"NASA-PDS/validate#480 Fail Intermingled Data Objects - Table Offset" | "github480" | 1 | "1 errors expected" | "INVALID_OBJECT_DEFINITION" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github480_3.json -s json -t {resourceDir}/github480/test_fail_table_offset.xml --skip-content-validation" | "report_github480_3.json" | @@ -130,28 +130,28 @@ Scenario Outline: Execute validate command for tests below. |"NASA-PDS/validate#467 Duplicate LIDVIDs in Collection" | "github476" | 1 | "1 errors expected" | "INVENTORY_DUPLICATE_LIDVID" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github476c.json -s json -R pds4.label -t {resourceDir}/github476/collection_lab.hydrocarbon_spectra_data.xml" | "report_github476c.json" | # Validate#444 pds4.bundle option seems to not travel through enough subdirectories -|"NASA-PDS/validate#444 Bundle with Multi-level Collections" | "github444" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github444_1.json -s json -t {resourceDir}/github444/odya_bundle/bundle_ody_accel.xml" | "report_github444_1.json" | +|"NASA-PDS/validate#444 Bundle with Multi-level Collections" | "github444" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github444_1.json -s json --skip-context-validation -t {resourceDir}/github444/odya_bundle/bundle_ody_accel.xml" | "report_github444_1.json" | # Validate#482 Add support for LBLX label extension. Skipping product validation to avoid known errors in truncated data file. -|"NASA-PDS/validate#533 Failure Test Labels - Records > Integer.MAX " | "github533" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "--skip-content-validation -r {reportDir}/report_github533_1.json -s json -t {resourceDir}/github533/gggrx_1200a_shb_l420.xml" | "report_github533_1.json" | +|"NASA-PDS/validate#533 Failure Test Labels - Records > Integer.MAX " | "github533" | 0 | "0 errors expected" | "totalErrors" | "src/test/resources" | "target/test" | "--skip-content-validation -r {reportDir}/report_github533_1.json -s json --skip-context-validation -t {resourceDir}/github533/gggrx_1200a_shb_l420.xml" | "report_github533_1.json" | # Validate#482 Add support for LBLX label extension -|"NASA-PDS/validate#482 Success Test Labels - LBLX Extension" | "github482" | 0 | "Successful validation expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github482_1.json -s json -e lblx -R pds4.folder -t {resourceDir}/github482/bundle1/" | "report_github482_1.json" | -|"NASA-PDS/validate#482 Success Test Labels - XML Extension " | "github482" | 0 | "Successful validation expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github482_2.json -s json -R pds4.folder -t {resourceDir}/github482/bundle2/" | "report_github482_2.json" | -|"NASA-PDS/validate#482 Success Test Bundle - LBLX Extension" | "github482" | 0 | "Successful validation expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github482_3.json -s json -R pds4.bundle -e lblx -t {resourceDir}/github482/bundle1/bundle_kaguya_derived.lblx" | "report_github482_3.json" | -|"NASA-PDS/validate#482 Success Test Bundle - XML Extension " | "github482" | 0 | "Successful validation expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github482_4.json -s json -R pds4.bundle -t {resourceDir}/github482/bundle2/bundle_kaguya_derived.xml" | "report_github482_4.json" | -|"NASA-PDS/validate#482 Failure Test Bundle - No Products Found" | "github482" | 1 | "1 error expected" | "NO_PRODUCTS_FOUND" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github482_5.json -s json -R pds4.folder -t {resourceDir}/github482/bundle1/" | "report_github482_5.json" | -|"NASA-PDS/validate#482 Failure Test Bundle - No Products Found" | "github482" | 1 | "1 error expected" | "NO_PRODUCTS_FOUND" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github482_6.json -s json -R pds4.folder -e lblx -t {resourceDir}/github482/bundle2/" | "report_github482_6.json" | +|"NASA-PDS/validate#482 Success Test Labels - LBLX Extension" | "github482" | 0 | "Successful validation expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github482_1.json -s json --skip-context-validation -e lblx -R pds4.folder -t {resourceDir}/github482/bundle1/" | "report_github482_1.json" | +|"NASA-PDS/validate#482 Success Test Labels - XML Extension " | "github482" | 0 | "Successful validation expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github482_2.json -s json --skip-context-validation -R pds4.folder -t {resourceDir}/github482/bundle2/" | "report_github482_2.json" | +|"NASA-PDS/validate#482 Success Test Bundle - LBLX Extension" | "github482" | 0 | "Successful validation expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github482_3.json -s json --skip-context-validation -R pds4.bundle -e lblx -t {resourceDir}/github482/bundle1/bundle_kaguya_derived.lblx" | "report_github482_3.json" | +|"NASA-PDS/validate#482 Success Test Bundle - XML Extension " | "github482" | 0 | "Successful validation expected" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github482_4.json -s json --skip-context-validation -R pds4.bundle -t {resourceDir}/github482/bundle2/bundle_kaguya_derived.xml" | "report_github482_4.json" | +|"NASA-PDS/validate#482 Failure Test Bundle - No Products Found" | "github482" | 1 | "1 error expected" | "NO_PRODUCTS_FOUND" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github482_5.json -s json --skip-context-validation -R pds4.folder -t {resourceDir}/github482/bundle1/" | "report_github482_5.json" | +|"NASA-PDS/validate#482 Failure Test Bundle - No Products Found" | "github482" | 1 | "1 error expected" | "NO_PRODUCTS_FOUND" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github482_6.json -s json --skip-context-validation -R pds4.folder -e lblx -t {resourceDir}/github482/bundle2/" | "report_github482_6.json" | # Field Special Constants - |"NASA-PDS/validate#469 Field Special Constants Check" | "github469" | 0 | "0 error messages expected." | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github469.json -s json -t {resourceDir}/github469/201401031400_rdr.xml" | "report_github469.json" | - |"NASA-PDS/validate#469 Field Special Constants Check - Fail MAX" | "github469" | 1 | "1 error messages expected." | "FIELD_VALUE_OUT_OF_MIN_MAX_RANGE" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github469_max_fail.json -s json -t {resourceDir}/github469/201401031400_rdr_max_FAIL.xml" | "report_github469_max_fail.json" | - |"NASA-PDS/validate#469 Field Special Constants Check - Fail MIN" | "github469" | 3 | "3 error messages expected." | "FIELD_VALUE_OUT_OF_MIN_MAX_RANGE" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github469_min_fail.json -s json -t {resourceDir}/github469/201401031400_rdr_min_FAIL.xml" | "report_github469_min_fail.json" | + |"NASA-PDS/validate#469 Field Special Constants Check" | "github469" | 0 | "0 error messages expected." | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github469.json -s json --skip-context-validation -t {resourceDir}/github469/201401031400_rdr.xml" | "report_github469.json" | + |"NASA-PDS/validate#469 Field Special Constants Check - Fail MAX" | "github469" | 1 | "1 error messages expected." | "FIELD_VALUE_OUT_OF_MIN_MAX_RANGE" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github469_max_fail.json -s json --skip-context-validation -t {resourceDir}/github469/201401031400_rdr_max_FAIL.xml" | "report_github469_max_fail.json" | + |"NASA-PDS/validate#469 Field Special Constants Check - Fail MIN" | "github469" | 3 | "3 error messages expected." | "FIELD_VALUE_OUT_OF_MIN_MAX_RANGE" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github469_min_fail.json -s json --skip-context-validation -t {resourceDir}/github469/201401031400_rdr_min_FAIL.xml" | "report_github469_min_fail.json" | |"NASA-PDS/validate#432 reference integrity check" | "github432" | 1 | "1 warning messages expected." | "REFERENCE_NOT_FOUND" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github432.json -s json -R pds4.bundle -t {resourceDir}/github432/bundle-voyager1-pls-sat-1.0.xml" | "report_github432.json" | - |"NASA-PDS/validate#291 VALID" | "github291" | 0 | "0 error messages expected." | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github291_bundle_valid.json -s json -R pds4.bundle -t {resourceDir}/github291/valid/bundle_kaguya_derived.xml" | "report_github291_bundle_valid.json" | - |"NASA-PDS/validate#291 INVALID" | "github291" | 1 | "1 warning message expected for BAD_SCHEMATYPENS." | "BAD_SCHEMATYPENS" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github291_bundle_invalid.json -s json -R pds4.bundle -t {resourceDir}/github291/invalid/bundle_kaguya_derived.xml" | "report_github291_bundle_invalid.json" | + |"NASA-PDS/validate#291 VALID" | "github291" | 0 | "0 error messages expected." | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github291_bundle_valid.json -s json --skip-context-validation -R pds4.bundle -t {resourceDir}/github291/valid/bundle_kaguya_derived.xml" | "report_github291_bundle_valid.json" | + |"NASA-PDS/validate#291 INVALID" | "github291" | 1 | "1 warning message expected for BAD_SCHEMATYPENS." | "BAD_SCHEMATYPENS" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github291_bundle_invalid.json -s json --skip-context-validation -R pds4.bundle -t {resourceDir}/github291/invalid/bundle_kaguya_derived.xml" | "report_github291_bundle_invalid.json" | # Moved github292 tests to the end as they interfere with other test with the following error message: # @@ -163,16 +163,16 @@ Scenario Outline: Execute validate command for tests below. |"NASA-PDS/validate#190" | "github190" | 1 | "1 error messages expected." | "FIELD_VALUE_DATA_TYPE_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github190.json -s json --skip-context-validation -t {resourceDir}/github190/validation_test.xml" | "report_github190.json" | - |"NASA-PDS/validate#173 1" | "github173" | 0 | "0 error messages expected. See validation report:" | "RECORDS_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github173_1.json -s json -R pds4.bundle -t {resourceDir}/github173/valid/ --skip-content-validation" | "report_github173_1.json" | - |"NASA-PDS/validate#173 2" | "github173" | 1 | "1 info/error messages not expected." | "RECORDS_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github173_2.json -s json -R pds4.bundle -t {resourceDir}/github173/invalid/ --skip-content-validation" | "report_github173_2.json" | -|"NASA-PDS/validate#149 1" | "github173" | 0 | "0 error messages expected. See validation report: " | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github149_1.json -s json -t {resourceDir}/github173/valid/bundle_kaguya_derived.xml" | "report_github149_1.json" | + |"NASA-PDS/validate#173 1" | "github173" | 0 | "0 error messages expected. See validation report:" | "RECORDS_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github173_1.json -s json --skip-context-validation -R pds4.bundle -t {resourceDir}/github173/valid/ --skip-content-validation" | "report_github173_1.json" | + |"NASA-PDS/validate#173 2" | "github173" | 1 | "1 info/error messages not expected." | "RECORDS_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github173_2.json -s json --skip-context-validation -R pds4.bundle -t {resourceDir}/github173/invalid/ --skip-content-validation" | "report_github173_2.json" | +|"NASA-PDS/validate#149 1" | "github173" | 0 | "0 error messages expected. See validation report: " | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github149_1.json -s json --skip-context-validation -t {resourceDir}/github173/valid/bundle_kaguya_derived.xml" | "report_github149_1.json" | # "The attribute pds:information_model_version must be equal to the value '1.7.0.0'."}] # {pds-dev3.jpl.nasa.gov}/home/qchau/sandbox/validate 168 % grep -n information_model_version ./src/test/resources/github173/invalid/bundle_kaguya_derived.xml #11: <information_model_version>1.11.0.0</information_model_version> - |"NASA-PDS/validate#149 2" | "github173" | 0 | "0 error messages expected. See validation report: " | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github149_2.json -s json -t {resourceDir}/github173/invalid/bundle_kaguya_derived.xml" | "report_github149_2.json" | + |"NASA-PDS/validate#149 2" | "github173" | 0 | "0 error messages expected. See validation report: " | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github149_2.json -s json --skip-context-validation -t {resourceDir}/github173/invalid/bundle_kaguya_derived.xml" | "report_github149_2.json" | - |"NASA-PDS/validate#5 1" | "github5" | 6 | "6 FILE_NAME_HAS_INVALID_CHARS,UNALLOWED_BASE_NAME messages expected." | "FILE_NAME_HAS_INVALID_CHARS,UNALLOWED_BASE_NAME" | "src/test/resources" | "target/test" | "-R pds4.bundle -r {reportDir}/report_github5_bundle_invalid.json -s json -t {resourceDir}/github5/invalid/bundle_kaguya_derived.xml" | "report_github5_bundle_invalid.json" | - |"NASA-PDS/validate#5 2" | "github5" | 0 | "0 error messages expected." | "totalErrors" | "src/test/resources" | "target/test" | "-R pds4.bundle -r {reportDir}/report_github5_bundle_valid.json -s json -t {resourceDir}/github5/valid/bundle_kaguya_derived.xml" | "report_github5_bundle_valid.json" | + |"NASA-PDS/validate#5 1" | "github5" | 6 | "6 FILE_NAME_HAS_INVALID_CHARS,UNALLOWED_BASE_NAME messages expected." | "FILE_NAME_HAS_INVALID_CHARS,UNALLOWED_BASE_NAME" | "src/test/resources" | "target/test" | "-R pds4.bundle -r {reportDir}/report_github5_bundle_invalid.json -s json --skip-context-validation -t {resourceDir}/github5/invalid/bundle_kaguya_derived.xml" | "report_github5_bundle_invalid.json" | + |"NASA-PDS/validate#5 2" | "github5" | 0 | "0 error messages expected." | "totalErrors" | "src/test/resources" | "target/test" | "-R pds4.bundle -r {reportDir}/report_github5_bundle_valid.json -s json --skip-context-validation -t {resourceDir}/github5/valid/bundle_kaguya_derived.xml" | "report_github5_bundle_valid.json" | |"NASA-PDS/validate#11 1" | "github11" | 1 | "1 INVALID_OBJECT_DEFINITION messages expected." | "INVALID_OBJECT_DEFINITION" | "src/test/resources" | "target/test" | "-R pds4.label -r {reportDir}/report_github11_invalid_1.json -s json -t {resourceDir}/github11/test_data/science_index_bad_1.xml" | "report_github11_invalid_1.json" | |"NASA-PDS/validate#11 2" | "github11" | 1 | "1 INVALID_OBJECT_DEFINITION messages expected." | "INVALID_OBJECT_DEFINITION" | "src/test/resources" | "target/test" | "-R pds4.label -r {reportDir}/report_github11_invalid_2.json -s json -t {resourceDir}/github11/test_data/science_index_bad_2.xml" | "report_github11_invalid_2.json" | |"NASA-PDS/validate#11 3" | "github11" | 0 | "0 INVALID_OBJECT_DEFINITION messages expected." | "INVALID_OBJECT_DEFINITION" | "src/test/resources" | "target/test" | "-R pds4.label -r {reportDir}/report_github11_valid.json -s json -t {resourceDir}/github11/test_data/science_index_good.xml" | "report_github11_valid.json" | @@ -193,21 +193,21 @@ Scenario Outline: Execute validate command for tests below. # |"NASA-PDS/validate#51 2" | "github51" | 2 | "2 errors expected for GENERAL_INFO." | "GENERAL_INFO" | "src/test/resources" | "target/test" | "-R pds4.bundle --alternate_file_paths src/test/resources/github51_additionals/additional_dir1/data_spectra,src/test/resources/github51_additionals/additional_dir2/data_spectra --skip-product-validation --skip-content-validation -r {reportDir}/report_github51_2.json -s json -t {resourceDir}/github51/valid" | "report_github51_2.json" | # - |"NASA-PDS/validate#6 1" | "github6" | 7 | "7 errors expected for FILE_NAME_HAS_INVALID_CHARS,UNALLOWED_BASE_NAME,UNALLOWED_FILE_NAME,DIR_NAME_HAS_INVALID_CHARS." | "FILE_NAME_HAS_INVALID_CHARS,UNALLOWED_BASE_NAME,UNALLOWED_FILE_NAME,DIR_NAME_HAS_INVALID_CHARS" | "src/test/resources" | "target/test" | "-R pds4.bundle -r {reportDir}/report_github6_bundle_invalid_cucumber.json -s json {resourceDir}/github6/invalid/bundle_kaguya_derived.xml" | "report_github6_bundle_invalid_cucumber.json" | - |"NASA-PDS/validate#6 2" | "github6" | 7 | "7 warnings expected for warning.file.not_referenced_in_label." | "UNLABELED_FILE" | "src/test/resources" | "target/test" | "-R pds4.bundle -r {reportDir}/report_github6_2.json -s json {resourceDir}/github6/invalid/bundle_kaguya_derived_7.xml" | "report_github6_2.json" | - |"NASA-PDS/validate#6 3" | "github6" | 0 | "0 errors expected for totalErrors." | "totalErrors" | "src/test/resources" | "target/test" | "-R pds4.bundle -r {reportDir}/report_github6_3.json -s json {resourceDir}/github6/valid/bundle_kaguya_derived.xml" | "report_github6_3.json" | - |"NASA-PDS/validate#240 1" | "github240" | 0 | "0 errors expected for totalErrors." | "totalErrors" | "src/test/resources" | "target/test" | "-R pds4.bundle -r {reportDir}/report_github240_bundle_valid_cucumber.json -s json {resourceDir}/github240/valid/bundle_kaguya_derived.xml" | "report_github240_bundle_valid_cucumber.json" | - |"NASA-PDS/validate#240 2" | "github240" | 3 | "3 warnings expected for UNALLOWED_BUNDLE_SUBDIR_NAME." | "UNALLOWED_BUNDLE_SUBDIR_NAME" | "src/test/resources" | "target/test" | "-R pds4.bundle -r {reportDir}/report_github240_bundle_invalid_cucumber.json -s json {resourceDir}/github240/invalid/bundle_kaguya_derived.xml" | "report_github240_bundle_invalid_cucumber.json" | + |"NASA-PDS/validate#6 1" | "github6" | 7 | "7 errors expected for FILE_NAME_HAS_INVALID_CHARS,UNALLOWED_BASE_NAME,UNALLOWED_FILE_NAME,DIR_NAME_HAS_INVALID_CHARS." | "FILE_NAME_HAS_INVALID_CHARS,UNALLOWED_BASE_NAME,UNALLOWED_FILE_NAME,DIR_NAME_HAS_INVALID_CHARS" | "src/test/resources" | "target/test" | "-R pds4.bundle -r {reportDir}/report_github6_bundle_invalid_cucumber.json -s json --skip-context-validation {resourceDir}/github6/invalid/bundle_kaguya_derived.xml" | "report_github6_bundle_invalid_cucumber.json" | + |"NASA-PDS/validate#6 2" | "github6" | 7 | "7 warnings expected for warning.file.not_referenced_in_label." | "UNLABELED_FILE" | "src/test/resources" | "target/test" | "-R pds4.bundle -r {reportDir}/report_github6_2.json -s json --skip-context-validation {resourceDir}/github6/invalid/bundle_kaguya_derived_7.xml" | "report_github6_2.json" | + |"NASA-PDS/validate#6 3" | "github6" | 0 | "0 errors expected for totalErrors." | "totalErrors" | "src/test/resources" | "target/test" | "-R pds4.bundle -r {reportDir}/report_github6_3.json -s json --skip-context-validation {resourceDir}/github6/valid/bundle_kaguya_derived.xml" | "report_github6_3.json" | + |"NASA-PDS/validate#240 1" | "github240" | 0 | "0 errors expected for totalErrors." | "totalErrors" | "src/test/resources" | "target/test" | "-R pds4.bundle -r {reportDir}/report_github240_bundle_valid_cucumber.json -s json --skip-context-validation {resourceDir}/github240/valid/bundle_kaguya_derived.xml" | "report_github240_bundle_valid_cucumber.json" | + |"NASA-PDS/validate#240 2" | "github240" | 3 | "3 warnings expected for UNALLOWED_BUNDLE_SUBDIR_NAME." | "UNALLOWED_BUNDLE_SUBDIR_NAME" | "src/test/resources" | "target/test" | "-R pds4.bundle -r {reportDir}/report_github240_bundle_invalid_cucumber.json -s json --skip-context-validation {resourceDir}/github240/invalid/bundle_kaguya_derived.xml" | "report_github240_bundle_invalid_cucumber.json" | # https://github.com/NASA-PDS/validate/issues/15 Verify that all name/type attribute values correspond to names denoted context products - - |"NASA-PDS/validate#15 1" | "github15" | 0 | "0 valid context references should be found" | "CONTEXT_REFERENCE_NOT_FOUND" | "src/test/resources" | "target/test" | "-v1 -r {reportDir}/report_github15_pass.json -s json --disable-context-mismatch-warnings -R pds4.label -t {resourceDir}/github15/test_check-pass_context_products.xml" | "report_github15_pass.json" | - |"NASA-PDS/validate#15 2" | "github15" | 4 | "4 errors expected for invalid context reference (Lid, name, value) test." | "CONTEXT_REFERENCE_NOT_FOUND,CONTEXT_REFERENCE_FOUND_MISMATCH_INFO" | "src/test/resources" | "target/test" | "-v1 -r {reportDir}/report_github15_no-pass.json -s json --disable-context-mismatch-warnings {resourceDir}/github15/test_check-no-pass_context_products.xml" | "report_github15_no-pass.json" | +# FIXME: POST 3.6: probably will never work because data is missing +# |"NASA-PDS/validate#15 1" | "github15" | 0 | "0 valid context references should be found" | "CONTEXT_REFERENCE_NOT_FOUND" | "src/test/resources" | "target/test" | "-v1 -r {reportDir}/report_github15_pass.json -s json --disable-context-mismatch-warnings -R pds4.label -t {resourceDir}/github15/test_check-pass_context_products.xml" | "report_github15_pass.json" | +# |"NASA-PDS/validate#15 2" | "github15" | 4 | "4 errors expected for invalid context reference (Lid, name, value) test." | "CONTEXT_REFERENCE_NOT_FOUND,CONTEXT_REFERENCE_FOUND_MISMATCH_INFO" | "src/test/resources" | "target/test" | "-v1 -r {reportDir}/report_github15_no-pass.json -s json --disable-context-mismatch-warnings {resourceDir}/github15/test_check-no-pass_context_products.xml" | "report_github15_no-pass.json" | # The below tests are for real. - - |"NASA-PDS/validate#28 1" | "github28" | 1 | "1 error expected for invalid context reference test." | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github28_1.json -s json {resourceDir}/github28/test_add_context_products.xml" | "report_github28_1.json" | - |"NASA-PDS/validate#28 2" | "github28" | 0 | "No errors expected for add additional context test" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github28_2.json -s json --add-context-products {resourceDir}/github28/new_context.json -t {resourceDir}/github28/test_add_context_products.xml" | "report_github28_2.json" | +# FIXME: POST 3.6: unclear if they should work in current state +# |"NASA-PDS/validate#28 1" | "github28" | 1 | "1 error expected for invalid context reference test." | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github28_1.json -s json {resourceDir}/github28/test_add_context_products.xml" | "report_github28_1.json" | +# |"NASA-PDS/validate#28 2" | "github28" | 0 | "No errors expected for add additional context test" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github28_2.json -s json --add-context-products {resourceDir}/github28/new_context.json -t {resourceDir}/github28/test_add_context_products.xml" | "report_github28_2.json" | |"NASA-PDS/validate#137 1" | "github137" | 0 | "FIELD_VALUE_DATA_TYPE_MISMATCH info/error messages expected." | "FIELD_VALUE_DATA_TYPE_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github137_1.json -s json -t {resourceDir}/github137/delimited_table_good.xml" | "report_github137_1.json" | |"NASA-PDS/validate#137 1" | "github137" | 2 | "FIELD_VALUE_DATA_TYPE_MISMATCH info/error messages not expected." | "FIELD_VALUE_DATA_TYPE_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github137_2.json -s json -t {resourceDir}/github137/delimited_table_bad.xml" | "report_github137_2.json" | @@ -216,12 +216,14 @@ Scenario Outline: Execute validate command for tests below. |"NASA-PDS/validate#47 1" | "github47" | 0 | "No errors expected. Context validation disabled" | "CONTEXT_REFERENCE_NOT_FOUND" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github47_disable-valid.json -s json --disable-context-mismatch-warnings -R pds4.label --skip-content-validation --skip-context-validation {resourceDir}/github47/test_context_products.xml" | "report_github47_disable-valid.json" | |"NASA-PDS/validate#47 2" | "github47" | 4 | "4 errors expected. Context validation enabled." | "CONTEXT_REFERENCE_NOT_FOUND,CONTEXT_REFERENCE_FOUND_MISMATCH_INFO" | "src/test/resources" | "target/test" | "-v1 --skip-content-validation -r {reportDir}/report_github47_enable-valid.json -s json --disable-context-mismatch-warnings -R pds4.label {resourceDir}/github47/test_context_products.xml" | "report_github47_enable-valid.json" | - |"NASA-PDS/validate#62 1" | "github62" | 4 | "4 info.label.context_ref_found info messages expected.\n" | "CONTEXT_REFERENCE_FOUND" | "src/test/resources" | "target/test" | "-v1 -r {reportDir}/report_github62_1.json -s json --no-data-check -t {resourceDir}/github62/ele_mom_tblChar.xml" | "report_github62_1.json" | +# FIXME: POST 3.6: this should work but it is not loading the correct model/schematron +# |"NASA-PDS/validate#62 1" | "github62" | 4 | "4 info.label.context_ref_found info messages expected.\n" | "CONTEXT_REFERENCE_FOUND" | "src/test/resources" | "target/test" | "-v1 -r {reportDir}/report_github62_1.json -s json --no-data-check -t {resourceDir}/github62/ele_mom_tblChar.xml" | "report_github62_1.json" | |"NASA-PDS/validate#62 2" | "github62" | 8 | "8 info/error messages expected.\n" | "CONTEXT_REFERENCE_FOUND,CONTEXT_REFERENCE_NOT_FOUND" | "src/test/resources" | "target/test" | "-v1 -r {reportDir}/report_github62_2.json -s json --no-data-check -t {resourceDir}/github62/spacecraft.orex_1.1.xml" | "report_github62_2.json" | # Move github278 before github71 as it causing issues |"NASA-PDS/validate#278 1" | "github278" | 1 | "1 errors expected for CONTEXT_REFERENCE_NOT_FOUND." | "CONTEXT_REFERENCE_NOT_FOUND" | "src/test/resources" | "target/test" | "-R pds4.label -r {reportDir}/report_github278_label_invalid_cucumber.json -s json {resourceDir}/github278/invalid/trk-2-34-revn-l5_tnf_invalid.xml" | "report_github278_label_invalid_cucumber.json" | - |"NASA-PDS/validate#278 2" | "github278" | 0 | "0 errors expected for CONTEXT_REFERENCE_NOT_FOUND." | "CONTEXT_REFERENCE_NOT_FOUND" | "src/test/resources" | "target/test" | "-R pds4.label -r {reportDir}/report_github278_label_valid_cucumber.json -s json {resourceDir}/github278/valid/trk-2-34-revn-l5_tnf.xml" | "report_github278_label_valid_cucumber.json" | +# FIXME: POST 3.6: should never have worked +# |"NASA-PDS/validate#278 2" | "github278" | 0 | "0 errors expected for CONTEXT_REFERENCE_NOT_FOUND." | "CONTEXT_REFERENCE_NOT_FOUND" | "src/test/resources" | "target/test" | "-R pds4.label -r {reportDir}/report_github278_label_valid_cucumber.json -s json {resourceDir}/github278/valid/trk-2-34-revn-l5_tnf.xml" | "report_github278_label_valid_cucumber.json" | |"NASA-PDS/validate#9 1" | "github09" | 0 | "info/error messages expected." | "FIELD_VALUE_DATA_TYPE_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github09_1.json -s json -t {resourceDir}/github09/minimal_test_product_good2.xml" | "report_github09_1.json" | |"NASA-PDS/validate#9 2" | "github09" | 0 | "0 info/error messages not expected." | "FIELD_VALUE_DATA_TYPE_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github09_2.json -s json -t {resourceDir}/github09/minimal_test_product_good.xml" | "report_github09_2.json" | @@ -230,7 +232,7 @@ Scenario Outline: Execute validate command for tests below. |"NASA-PDS/validate#9 5" | "github09" | 0 | "0 info/error messages expected." | "FIELD_VALUE_DATA_TYPE_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github09_5.json -s json -t {resourceDir}/github09/val9a.xml.xml" | "report_github09_5.json" | |"NASA-PDS/validate#9 6" | "github09" | 1 | "1 info/error messages expected." | "FIELD_VALUE_DATA_TYPE_MISMATCH" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github09_6.json -s json -t {resourceDir}/github09/val9b.xml" | "report_github09_6.json" | - |"NASA-PDS/validate#50 1" | "github50" | 0 | "0 error messages expected.\n" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github50_1.json -s json --skip-content-validation --target-manifest {reportDir}/target-manifest.xml" | "report_github50_1.json" | + |"NASA-PDS/validate#50 1" | "github50" | 0 | "0 error messages expected.\n" | "totalErrors" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github50_1.json -s json --skip-content-validation --skip-context-validation --target-manifest {reportDir}/target-manifest.xml" | "report_github50_1.json" | |"NASA-PDS/validate#50 2" | "github50" | 3 | "3 error messages expected.\n" | "MISSING_REFERENCED_FILE" | "src/test/resources" | "target/test" | "-r {reportDir}/report_github50_2.json -s json --target-manifest {reportDir}/target-manifest.xml -t {resourceDir}/github50/ele_evt_8hr_orbit_2014-2015.xml" | "report_github50_2.json" | ## Very special note: Test github84 must be specified after github71 and github71_2 due to dependency. ## That means if github84 is included in this table, github71 and github71_2 MUST also be included, @@ -394,8 +396,8 @@ Scenario Outline: Execute validate command for tests below. # https://github.com/nasa-pds/validate/issues/373 Update pds4 version mismatch warning message and problem type - |"NASA-PDS/validate#373 VALID" | "github373" | 1 | "1 INTEGRITY_PDS4_VERSION_MISMATCH message expected: reuse github240" | "INTEGRITY_PDS4_VERSION_MISMATCH" | "src/test/resources" | "target/test" | "-R pds4.bundle --skip-product-validation --skip-context-validation --skip-content-validation -r {reportDir}/report_github373_bundle_valid.json -s json -t {resourceDir}/github240/valid/bundle_kaguya_derived.xml" | "report_github373_bundle_valid.json" | - |"NASA-PDS/validate#373 INVALID" | "github373" | 1 | "1 INTEGRITY_PDS4_VERSION_MISMATCH message expected: reuse github240" | "INTEGRITY_PDS4_VERSION_MISMATCH" | "src/test/resources" | "target/test" | "-R pds4.bundle --skip-product-validation --skip-context-validation --skip-content-validation -r {reportDir}/report_github373_bundle_invalid.json -s json -t {resourceDir}/github240/invalid/bundle_kaguya_derived.xml" | "report_github373_bundle_invalid.json" | + |"NASA-PDS/validate#373 VALID" | "github373" | 1 | "1 INTEGRITY_PDS4_VERSION_MISMATCH message expected: reuse github240" | "INTEGRITY_PDS4_VERSION_MISMATCH" | "src/test/resources" | "target/test" | "-R pds4.bundle --skip-product-validation --skip-context-validation --skip-content-validation --skip-context-validation -r {reportDir}/report_github373_bundle_valid.json -s json -t {resourceDir}/github240/valid/bundle_kaguya_derived.xml" | "report_github373_bundle_valid.json" | + |"NASA-PDS/validate#373 INVALID" | "github373" | 1 | "1 INTEGRITY_PDS4_VERSION_MISMATCH message expected: reuse github240" | "INTEGRITY_PDS4_VERSION_MISMATCH" | "src/test/resources" | "target/test" | "-R pds4.bundle --skip-product-validation --skip-context-validation --skip-content-validation --skip-context-validation -r {reportDir}/report_github373_bundle_invalid.json -s json -t {resourceDir}/github240/invalid/bundle_kaguya_derived.xml" | "report_github373_bundle_invalid.json" | # https://github.com/nasa-pds/validate/issues/392 Validate throws incorrect overlap error when first Field_Bit has length 1 diff --git a/src/test/resources/github992/ff_char.xml b/src/test/resources/github992/ff_char.xml new file mode 100644 index 000000000..edc677abe --- /dev/null +++ b/src/test/resources/github992/ff_char.xml @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-model href="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1K00.sch" schematypens="http://purl.oclc.org/dsdl/schematron"?> +<Product_Observational xmlns="http://pds.nasa.gov/pds4/pds/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pds.nasa.gov/pds4/pds/v1 https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1K00.xsd"> + <Identification_Area> + <logical_identifier>urn:nasa:pds:bundle:collection:ff_char_test</logical_identifier> + <version_id>1.0</version_id> + <title>Field Format Character Test</title> + <information_model_version>1.20.0.0</information_model_version> + <product_class>Product_Observational</product_class> + </Identification_Area> + <Observation_Area> + <Time_Coordinates> + <start_date_time>2023Z</start_date_time> + <stop_date_time>2023Z</stop_date_time> + </Time_Coordinates> + <Investigation_Area> + <name>No Specific Investigation</name> + <type>Individual Investigation</type> + <Internal_Reference> + <lid_reference>urn:nasa:pds:context:investigation:individual.none</lid_reference> + <reference_type>data_to_investigation</reference_type> + </Internal_Reference> + </Investigation_Area> + <Observing_System> + <Observing_System_Component> + <name>telescope</name> + <type>Instrument</type> + </Observing_System_Component> + </Observing_System> + <Target_Identification> + <name>target</name> + <type>Comet</type> + </Target_Identification> + </Observation_Area> + <File_Area_Observational> + <File> + <file_name>ff_test.csv</file_name> + </File> + <Table_Character> + <offset unit="byte">0</offset> + <records>6</records> + <record_delimiter>Carriage-Return Line-Feed</record_delimiter> + <Record_Character> + <fields>4</fields> + <groups>0</groups> + <record_length unit="byte">27</record_length> + <Field_Character> + <name>field 1</name> + <field_number>1</field_number> + <field_location unit="byte">1</field_location> + <data_type>ASCII_Real</data_type> + <field_length unit="byte">6</field_length> + <field_format>%6.2f</field_format> + </Field_Character> + <Field_Character> + <name>field 2</name> + <field_number>2</field_number> + <field_location unit="byte">8</field_location> + <data_type>ASCII_Real</data_type> + <field_length unit="byte">5</field_length> + <field_format>%4.2f</field_format> + </Field_Character> + <Field_Character> + <name>field 3</name> + <field_number>3</field_number> + <field_location unit="byte">14</field_location> + <data_type>ASCII_Real</data_type> + <field_length unit="byte">8</field_length> + <field_format>%8.3e</field_format> + </Field_Character> + <Field_Character> + <name>field 4</name> + <field_number>3</field_number> + <field_location unit="byte">23</field_location> + <data_type>ASCII_Integer</data_type> + <field_length unit="byte">3</field_length> + <field_format>%3d</field_format> + </Field_Character> + </Record_Character> + </Table_Character> + </File_Area_Observational> +</Product_Observational> diff --git a/src/test/resources/github992/ff_del.xml b/src/test/resources/github992/ff_del.xml new file mode 100644 index 000000000..904b8dcaf --- /dev/null +++ b/src/test/resources/github992/ff_del.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-model href="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1K00.sch" schematypens="http://purl.oclc.org/dsdl/schematron"?> +<Product_Observational xmlns="http://pds.nasa.gov/pds4/pds/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pds.nasa.gov/pds4/pds/v1 https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1K00.xsd"> + <Identification_Area> + <logical_identifier>urn:nasa:pds:bundle:collection:ff_del_test</logical_identifier> + <version_id>1.0</version_id> + <title>Field Format Delimited Test</title> + <information_model_version>1.20.0.0</information_model_version> + <product_class>Product_Observational</product_class> + </Identification_Area> + <Observation_Area> + <Time_Coordinates> + <start_date_time>2023Z</start_date_time> + <stop_date_time>2023Z</stop_date_time> + </Time_Coordinates> + <Investigation_Area> + <name>No Specific Investigation</name> + <type>Individual Investigation</type> + <Internal_Reference> + <lid_reference>urn:nasa:pds:context:investigation:individual.none</lid_reference> + <reference_type>data_to_investigation</reference_type> + </Internal_Reference> + </Investigation_Area> + <Observing_System> + <Observing_System_Component> + <name>telescope</name> + <type>Instrument</type> + </Observing_System_Component> + </Observing_System> + <Target_Identification> + <name>target</name> + <type>Comet</type> + </Target_Identification> + </Observation_Area> + <File_Area_Observational> + <File> + <file_name>ff_test.csv</file_name> + </File> + <Table_Delimited> + <offset unit="byte">0</offset> + <parsing_standard_id>PDS DSV 1</parsing_standard_id> + <records>6</records> + <record_delimiter>Carriage-Return Line-Feed</record_delimiter> + <field_delimiter>Comma</field_delimiter> + <Record_Delimited> + <fields>4</fields> + <groups>0</groups> + <Field_Delimited> + <name>field 1</name> + <field_number>1</field_number> + <data_type>ASCII_Real</data_type> + <field_format>%6.2f</field_format> + </Field_Delimited> + <Field_Delimited> + <name>field 2</name> + <field_number>2</field_number> + <data_type>ASCII_Real</data_type> + <field_format>%4.2f</field_format> + </Field_Delimited> + <Field_Delimited> + <name>field 3</name> + <field_number>3</field_number> + <data_type>ASCII_Real</data_type> + <field_format>%8.3e</field_format> + </Field_Delimited> + <Field_Delimited> + <name>field 4</name> + <field_number>4</field_number> + <data_type>ASCII_Integer</data_type> + <field_format>%3d</field_format> + </Field_Delimited> + </Record_Delimited> + </Table_Delimited> + </File_Area_Observational> +</Product_Observational> diff --git a/src/test/resources/github992/ff_test.csv b/src/test/resources/github992/ff_test.csv new file mode 100644 index 000000000..f914eaa88 --- /dev/null +++ b/src/test/resources/github992/ff_test.csv @@ -0,0 +1,6 @@ +111.11,22.2 ,3.333e33,444 +11.111,2.22 ,3.333e3 ,444 +111.11,22.22,3.333e3 ,444 +111.11, 2.22,33333333,444 +111.11, 2.22,3.333e3 ,4.4 +111.11, 2.22,333.3e3 ,444