stevedlawrence commented on code in PR #944:
URL: https://github.com/apache/daffodil/pull/944#discussion_r1093421789
##########
daffodil-cli/src/test/scala/org/apache/daffodil/cliTest/TestCLIParsing.scala:
##########
@@ -590,6 +590,19 @@ class TestCLIparsing {
} (ExitCode.LeftOverData)
}
+ @Test def test_XXX_CLI_Parsing_Stream_03(): Unit = {
+ val schema =
path("daffodil-cli/src/test/resources/org/apache/daffodil/CLI/cli_schema_02.dfdl.xsd")
+
+ runCLI(args"--trace parse --stream -s $schema") { cli =>
+ cli.send("123ab", inputDone = true)
+ cli.expect("<a>1</a>")
+ cli.expect("<a>2</a>")
+ cli.expect("<a>3</a>")
+ cli.expectErr("Left over data after consuming 0 bits while streaming.")
+ cli.expectErr("Stopped after consuming 24 bit(s) with at least 16 bit(s)
remaining.")
+ } (ExitCode.LeftOverData)
Review Comment:
You're right. Somehow I saw `maxOccurs="unbounded"` on the `a` element, but
it's just the default of `1` so the schema does what you describe. That schema
is fine. My mistake. Agreed the test is probably better with `ab` removed so we
get a success exit code.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]