You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2021/08/12 12:53:00 UTC

[jira] [Resolved] (DAFFODIL-2226) MS Windows: unnecessarily repetitive conditionalization in CLI/command-line-oriented tests

     [ https://issues.apache.org/jira/browse/DAFFODIL-2226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Lawrence resolved DAFFODIL-2226.
--------------------------------------
    Resolution: Duplicate

Resolving as duplicate of DAFFODIL-2381. The newer bug contains more suggestions and references an potential approach already implemented for schematron integration tests.

> MS Windows: unnecessarily repetitive conditionalization in CLI/command-line-oriented tests
> ------------------------------------------------------------------------------------------
>
>                 Key: DAFFODIL-2226
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2226
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: Clean Ups, QA
>    Affects Versions: 2.4.0
>            Reporter: Mike Beckerle
>            Priority: Minor
>              Labels: beginner
>
> CLI tests, and tests of some features like UDFs are following a pattern which is unnecessarily redundant:
> {code:java}
>     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)
> {code}
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)