Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-554

CLI: Assertion failures are not reported

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • s8
    • s7
    • None
    • None

      I created a multi-file schema CLI test where a simpleType with a restriction is defined in one file, and an element of that simpleType that contains an assertion that uses checkConstraints is defined in another schema. That element is used in the base schema as part of a sequence. The data I provide to the test does not meet the Assertion. No data gets parsed and no error is provided to the user, just an empty dataset. This is the command I run:

      echo "unacceptable,hello" | ./daffodil-core/target/start parse -s daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_base_08.dfdl.xsd --root base2 -s daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_A_08.dfdl.xsd -s daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_B_08.dfdl.xsd

      Since I was testing a combination of things here, I created a few tests to try and narrow down the issue:

      In case it was an issue with spreading a pattern restriction/assertion across multiple schema files, I ran a CLI test against a pattern assertion that was contained in a single file:

      echo "unacceptable" | ./daffodil-core/target/start parse -s daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_B_08.dfdl.xsd --root bElem2

      with the same result: <nothing></nothing>

      I also created a conformance test (multifile_facets_05) that split the assertion across several files, and that test failed correctly with an Assertion failure message.

      The test components are in the following files:

      1. modified: daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_B_08.dfdl.xsd
      2. modified: daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_C_08.dfdl.xsd
      3. modified: daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_base_08.dfdl.xsd
      4. modified: daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/namespaces.tdml
      5. modified: daffodil-test/src/test/scala/edu/illinois/ncsa/daffodil/section06/namespaces/TestNamespaces.scala

              jchab Jessie Chab
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: