Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing the whitespace nodes #57

Open
GoogleCodeExporter opened this issue Jun 8, 2015 · 1 comment
Open

Testing the whitespace nodes #57

GoogleCodeExporter opened this issue Jun 8, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

I'm trying to test the text nodes taking into account the difference in the 
quantity of spaces.

Here's a sample scenario:

<scenario label="test">
    <call template="identity">
        <param name="content">
            <w:t>
                <space>  </space>
            </w:t>
        </param>
    </call>


    <expect>
        <w:t>
            <space>   </space>
        </w:t>
    </expect>
</scenario>

And the referenced template:

<xsl:template name="identity">
    <xsl:param name="content"/>

    <xsl:sequence select="$content"/>
</xsl:template>

I expect this test to fail but it's passed.

Original issue reported on code.google.com by mzhal...@gmail.com on 1 Apr 2013 at 3:40

@GoogleCodeExporter
Copy link
Author

  Hi,

  Sorry for the late response...  Actually, this is on purpose.  We want the above test to succeed exactly for the same reason that we want the following test to succeed:

{{{
<scenario label="test">
   <call template="identity">
      <param name="content">
         <w:t>
            <text>Hello, world!</text>
         </w:t>
      </param>
   </call>
   <expect>
      <w:t>
         <text>Hello, world!</text>
      </w:t>
   </expect>
</scenario>
}}}

  But I found what I think is a bug, because I would say I'd like the following to fail:

{{{
<scenario label="test">
   <call template="identity">
      <param name="content">
         <w:t>
            <space xml:space="preserve"> </space>
         </w:t>
      </param>
   </call>
   <expect>
      <w:t>
         <space xml:space="preserve">     </space>
      </w:t>
   </expect>
</scenario>
}}}

Original comment by fgeorges on 15 Jul 2013 at 5:25

  • Changed state: Accepted

innovimax pushed a commit to innovimax/xspec that referenced this issue Jan 17, 2017
* remove output and set up and clean test environment  expath#57 expath#64

- remove directories containing output of XSpec unit tests
- add directories and files to .gitignore 
- set up and clean the bats testing environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant