Skip to content

Commit

Permalink
add bats test issue expath#46 / pr expath#48 (expath#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro Cirulli authored Jan 8, 2017
1 parent 187f157 commit ba5f97c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/xspec-46.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet exclude-result-prefixes="#all" version="2.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template as="node()" match="node()">
<xsl:sequence select="." />
</xsl:template>
</xsl:stylesheet>
9 changes: 9 additions & 0 deletions test/xspec-46.xspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" xmlns:xs="http://www.w3.org/2001/XMLSchema" stylesheet="xspec-46.xsl">
<x:scenario label="Scenario-1">
<x:context>
<foo/>
</x:context>
<x:expect label="Expect-1" select="1" test="count(foo)"/>
</x:scenario>
</x:description>
8 changes: 8 additions & 0 deletions test/xspec.bats
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,11 @@
[ "$status" -eq 0 ]
[ "${lines[18]}" = "Report available at ../tutorial/xspec/escape-for-regex-result.html" ]
}


@test "invoking xspec.sh that passes a non xs:boolean does not raise a warning #46" {
run ../bin/xspec.sh ../test/xspec-46.xspec
echo $output
[ "$status" -eq 0 ]
[[ "${lines[3]}" =~ "Testing with" ]]
}

0 comments on commit ba5f97c

Please sign in to comment.