You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2022/11/14 13:25:45 UTC

[GitHub] [daffodil] stevedlawrence commented on a diff in pull request #873: Ensure CLI performance metrics are accurate with SAX infosets

stevedlawrence commented on code in PR #873:
URL: https://github.com/apache/daffodil/pull/873#discussion_r1021539935


##########
daffodil-cli/src/it/scala/org/apache/daffodil/parsing/TestCLIParsing.scala:
##########
@@ -642,6 +642,14 @@ class TestCLIparsing {
     } (ExitCode.Success)
   }
 
+  @Test def test_XXX_CLI_Parsing_SimpleParse_null(): Unit = {
+    val schema = path("daffodil-test/src/test/resources/org/apache/daffodil/section00/general/generalSchema.dfdl.xsd")
+
+    runCLI(args"parse -I null -s $schema -r e1") { cli =>
+      cli.send("Hello", inputDone = true)
+    } (ExitCode.Success)

Review Comment:
   Unfortunately yes.
   
   The problem is the expectit library can't expect something to not happen. One potential way to check that nothing is output is to expect `EOF`, and the `Result` that is returned allows you to get the characters before the match, which can be checked to be empty. But that `EOF` check needs to be done after the streams are closed to get an EOF, and with the current API we don't have the expect object anymore when the streams are closed.
   
   That said, I think maybe an alternative is change this this to a forking test. That way the stream will close when the subprocess ends and expect should be able to match the EOF. I'll give that a shot.



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org