You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Michael Beckerle (JIRA)" <ji...@apache.org> on 2018/04/20 17:50: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=16446087#comment-16446087 ] 

Michael Beckerle commented on DAFFODIL-1928:
--------------------------------------------

I think this is related to a bug I reported long time ago in the scala.xml libraries.

https://github.com/scala/scala-xml/issues/72

This issue was about scala.xml libraries not handling apos (single quote aka apostrophe) correctly, and not supporting the &apos; entity form either. 

This bug was fixed and rolled into scala.xml libraries version 1.1.0. 

In my current scala 2.1.0 branch sandbox, I see that we're requesting version 1.0.6 of this library.

    "org.scala-lang.modules" %% "scala-xml" % "1.0.6",

So perhaps we can just upgrade and this will be fixed?


> TDMLRunner removes apostrophes from expected when &apos; 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: Major
>
> TDMLRunner removes apostrophes from expected when &apos; 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 &apos;Number&apos; 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
(v7.6.3#76005)