Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2226

MS Windows: unnecessarily repetitive conditionalization in CLI/command-line-oriented tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.4.0
    • None
    • Clean Ups, QA

    Description

      CLI tests, and tests of some features like UDFs are following a pattern which is unnecessarily redundant:

          val schemaFile = Util.daffodilPath("daffodil-udf/src/test/resources/org/apache/daffodil/udf/genericUdfSchema.xsd")
      
              val (testSchemaFile) = if (Util.isWindows) (Util.cmdConvert(schemaFile)) else (schemaFile)
      

      Every file path used by every test has this explicit MS-Windows conditionalization in it. Over and over and over.

      This should be replaced by things that combine what Util.daffodilPath and Util.cmdConvert do, so that all we require is that people construct a, for example, Util.filePath(....) object from a platform independent (i.e., "/" separated) path name. The fact that this requires MS-windows conditionalization should be hidden.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mbeckerle Mike Beckerle
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: