You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Dave Thompson (Jira)" <ji...@apache.org> on 2021/01/29 12:13:00 UTC
[jira] [Commented] (DAFFODIL-1928) TDMLRunner removes apostrophes
from expected when ' is used in infoset
[ https://issues.apache.org/jira/browse/DAFFODIL-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17274386#comment-17274386 ]
Dave Thompson commented on DAFFODIL-1928:
-----------------------------------------
{color:#000000}Tests test_apos_test1 and test_apos_test2 were commented out in file TestTDMLRUNNER2.scala.{color}
{color:#000000}Uncommented the tests and got the following error:{color}
{color:#000000}[error] /home/dthompson/incubator-daffodil/daffodil-tdml-processor/src/test/scala/org/apache/daffodil/tdml/TestTDMLRunner2.scala:519:31: Procedure syntax is deprecated. Convert procedure `test_apos_test1` to method by adding `: Unit =`.{color}
{color:#000000}Added ": Unit =" to the @Test def statements add got the following error:{color}
{color:#000000}[error] /home/dthompson/incubator-daffodil/daffodil-tdml-processor/src/test/scala/org/apache/daffodil/tdml/TestTDMLRunner2.scala:519:41: not found: value runner
[error] @Test def test_apos_test1(): Unit = \{ runner.runOneTest("apos_test1") }{color}
{color:#000000}Modified the tests to the format of test "@Test def test_quote_test1()" and both test pass.{color}
{color:#000000}This issue appears to be resolved, however tests test_apos_test1 and test_apos_test2 need to be updated before this ticket can be closed.{color}
> TDMLRunner removes apostrophes from expected when ' is used in infoset
> ---------------------------------------------------------------------------
>
> Key: DAFFODIL-1928
> URL: https://issues.apache.org/jira/browse/DAFFODIL-1928
> Project: Daffodil
> Issue Type: Bug
> Components: TDML Runner
> Affects Versions: 2.1.0
> Reporter: Dave Thompson
> Priority: Minor
> Labels: verify
>
> TDMLRunner removes apostrophes from expected when ' is used in infoset. When the test is executed the apostrophes are stripped from the expected result which cause the comparison to fail.
> *Infoset in test:*
> <infoset>
> <dfdlInfoset>
> <tns:record>
> <tns:item>1</tns:item>
> <tns:item>Column 'Number' Two</tns:item>
> <tns:item>3</tns:item>
> <tns:item>4</tns:item>
> <tns:item>5</tns:item>
> </tns:record>
> </dfdlInfoset>
> </infoset>
> *Test Result:*
> [error] Test org.apache.daffodil.section07.escapeScheme.TestEscapeSchemeDebug.test_escBlkAposRemoved failed: java.lang.Exception:
> [error] Comparison failed.
> [error] Expected
> [error] <record><item>1</item><item>Column Number Two</item><item>3</item><item>4</item><item>5</item></record>
> [error] Actual
> [error] <record><item>1</item><item>Column 'Number' Two</item><item>3</item><item>4</item><item>5</item></record>
> [error] Differences were (path, expected, actual):
> [error] (record/item[2],'Column Number Two','Column 'Number' Two'), took 2.114 sec
> *See daffodil-tdml Debug Test Case:*
> org.apache.daffodil.tdml.TestTDMLRunner3.test_escBlkAposRemoved
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)