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

Open
AirQuick opened this issue Mar 5, 2018 · 2 comments

Comments

Projects
None yet
1 participant
@AirQuick
Copy link
Member

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

This comment has been minimized.

Copy link
Member Author

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 AirQuick added the bug label Mar 5, 2018

@AirQuick AirQuick self-assigned this Mar 5, 2018

AirQuick added a commit that referenced this issue Feb 26, 2019

@AirQuick

This comment has been minimized.

Copy link
Member Author

commented Feb 26, 2019

Reopening for XQuery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.