stevedlawrence commented on a change in pull request #216: Do not abort when an
import/includes fails
URL: https://github.com/apache/incubator-daffodil/pull/216#discussion_r282944084
##########
File path:
daffodil-cli/src/it/scala/org/apache/daffodil/parsing/TestCLIParsing.scala
##########
@@ -989,4 +989,34 @@ class TestCLIparsing {
}
}
+ @Test def test_CLI_Parsing_XCatalog_Resolution_Failure() {
+ val schemaFile =
Util.daffodilPath("daffodil-cli/src/it/resources/org/apache/daffodil/CLI/xcatalog_import_failure.dfdl.xsd")
+ val testSchemaFile = if (Util.isWindows) Util.cmdConvert(schemaFile) else
schemaFile
+
+ val xcatalogFile =
Util.daffodilPath("daffodil-cli/src/it/resources/org/apache/daffodil/CLI/xcatalog_invalid.xml")
+ val testXcatalogFile = if (Util.isWindows) Util.cmdConvert(xcatalogFile)
else xcatalogFile
+
+ val DAFFODIL_JAVA_OPTS = Map("DAFFODIL_JAVA_OPTS" ->
("-Dxml.catalog.files=" + testXcatalogFile + " -Xms256m -Xmx2048m
-Djline.terminal=jline.UnsupportedTerminal -Dfile.encoding=UTF-8"))
+
+ val shell = Util.startIncludeErrors("", envp = DAFFODIL_JAVA_OPTS)
+
+ try {
+ val cmd = String.format(Util.echoN("X") + "| %s parse -s %s",
Util.binPath, testSchemaFile)
+ shell.sendLine(cmd)
+
+ shell.expectIn(1, contains("Schema Definition Error"))
+ shell.expectIn(1, contains("/this/path/does/not/exist"))
Review comment:
This line is going to fail in windows due back vs forward slashes, need to
move this into the isWIndows check below.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services