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

Unhelpful report when test attribute is a boolean #177

Closed
AirQuick opened this issue Mar 5, 2018 · 2 comments · Fixed by #345 or #483
Closed

Unhelpful report when test attribute is a boolean #177

AirQuick opened this issue Mar 5, 2018 · 2 comments · Fixed by #345 or #483
Assignees
Labels

Comments

@AirQuick
Copy link
Member

AirQuick commented Mar 5, 2018

Run this test:

do-nothing.xsl

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" />

test.xspec

<?xml version="1.0" encoding="UTF-8"?>
<x:description stylesheet="do-nothing.xsl" xmlns:x="http://www.jenitennison.com/xslt/xspec">
	<x:scenario label="Scenario for testing the report">
		<x:call function="exactly-one">
			<x:param as="element(foo)">
				<foo />
			</x:param>
		</x:call>
		<x:expect test="empty(element(foo))" label="when @test is boolean" />
	</x:scenario>
</x:description>

Its HTML report looks like this:
test

Problems:

  • Result has diff which doesn't make sense.
  • Expected Result is empty.
@AirQuick
Copy link
Member Author

AirQuick commented Mar 5, 2018

The reporting code is there, but not working:

<xsl:when test="not(x:result) and x:expect/@test">
<pre>
<xsl:value-of select="@test" />
</pre>
</xsl:when>

@AirQuick
Copy link
Member Author

Reopening for XQuery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment