Skip to content

Commit

Permalink
Merge branch 'master' into test_saxon-12-4
Browse files Browse the repository at this point in the history
  • Loading branch information
galtm committed Dec 4, 2023
2 parents bd1b6c2 + e09c696 commit aef6fe3
Show file tree
Hide file tree
Showing 16 changed files with 660 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .commitlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"xproc",
"schema",
"maven",
"cli"
"cli",
"ant"
]
]
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- run: gpg --version

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ You are also encouraged to use a scope to highlight which functionality is affec
| `schema` | Schema for .xspec files |
| `maven` | Maven |
| `cli` | `bin/xspec.*` |
| `ant` | Ant |

Note that type is mandatory and scope is optional and both values should be written in lower case.

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.2</version>
<version>3.6.3</version>
<configuration>
<notimestamp>true</notimestamp>
</configuration>
Expand Down
17 changes: 17 additions & 0 deletions test/end-to-end/cases/expected/query/force-focus_none-junit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="force-focus_none.xspec">
<testsuite name="Test @focus" tests="4" failures="2">
<testcase name="an unfocused Success scenario must be Pending it would return Success if it were not Pending"
status="passed"/>
<testcase name="an unfocused Failure scenario must be Pending it would return Failure if it were not Pending"
status="failed">
<failure message="expect assertion failed">Expecting: $t:result instance of xs:string</failure>
</testcase>
<testcase name="a focused Success scenario must execute the test and return Success"
status="passed"/>
<testcase name="a focused Failure scenario must execute the test and return Failure"
status="failed">
<failure message="expect assertion failed">Expecting: $t:result instance of xs:string</failure>
</testcase>
</testsuite>
</testsuites>
139 changes: 139 additions & 0 deletions test/end-to-end/cases/expected/query/force-focus_none-result.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Test Report for x-urn:test:do-nothing (passed: 2 / pending: 0 / failed: 2 / total: 4)</title>
<link rel="stylesheet" type="text/css" href="../../../../../src/reporter/test-report.css" />
</head>
<body>
<h1>Test Report</h1>
<p>Query: x-urn:test:do-nothing</p>
<p>Query-at: <a href="../../../../do-nothing.xqm">do-nothing.xqm</a></p>
<p>XSpec: <a href="../../force-focus_none.xspec">force-focus_none.xspec</a></p>
<p>Tested: 1 January 2000 at 00:00</p>
<h2>Contents</h2>
<table class="xspec">
<colgroup>
<col style="width:75%" />
<col style="width:6.25%" />
<col style="width:6.25%" />
<col style="width:6.25%" />
<col style="width:6.25%" />
</colgroup>
<thead>
<tr>
<th></th>
<th class="totals">passed: 2</th>
<th class="totals">pending: 0</th>
<th class="totals">failed: 2</th>
<th class="totals">total: 4</th>
</tr>
</thead>
<tbody>
<tr class="failed">
<th><a href="#top_scenario1">Test @focus</a></th>
<th class="totals">2</th>
<th class="totals">0</th>
<th class="totals">2</th>
<th class="totals">4</th>
</tr>
</tbody>
</table>
<div id="top_scenario1">
<h2 class="successful">Test @focus<span class="scenario-totals">passed: 2 / pending: 0 / failed: 2 / total: 4</span></h2>
<table class="xspec" id="table_scenario1">
<colgroup>
<col style="width:75%" />
<col style="width:25%" />
</colgroup>
<tbody>
<tr class="successful">
<th>Test @focus</th>
<th>passed: 2 / pending: 0 / failed: 2 / total: 4</th>
</tr>
<tr class="successful">
<th>an unfocused Success scenario must be Pending</th>
<th>passed: 1 / pending: 0 / failed: 0 / total: 1</th>
</tr>
<tr class="successful">
<td>it would return Success if it were not Pending</td>
<td>Success</td>
</tr>
<tr class="failed">
<th><a href="#scenario1-scenario2">an unfocused Failure scenario must be Pending</a></th>
<th>passed: 0 / pending: 0 / failed: 1 / total: 1</th>
</tr>
<tr class="failed">
<td><a href="#scenario1-scenario2-expect1">it would return Failure if it were not Pending</a></td>
<td>Failure</td>
</tr>
<tr class="successful">
<th>a focused Success scenario</th>
<th>passed: 1 / pending: 0 / failed: 0 / total: 1</th>
</tr>
<tr class="successful">
<td>must execute the test and return Success</td>
<td>Success</td>
</tr>
<tr class="failed">
<th><a href="#scenario1-scenario4">a focused Failure scenario</a></th>
<th>passed: 0 / pending: 0 / failed: 1 / total: 1</th>
</tr>
<tr class="failed">
<td><a href="#scenario1-scenario4-expect1">must execute the test and return Failure</a></td>
<td>Failure</td>
</tr>
</tbody>
</table>
<div id="scenario1-scenario2">
<h3>Test @focus an unfocused Failure scenario must be Pending</h3>
<div id="scenario1-scenario2-expect1" class="xTestReport">
<h4 class="xTestReportTitle">it would return Failure if it were not Pending</h4>
<div class="xTestReportHint"><a href="https://github.com/xspec/xspec/wiki/Understanding-Test-Results" target="_blank" title="What does this report mean?">[?]</a></div>
<table class="xspecResult">
<thead>
<tr>
<th>Result</th>
<th>Expecting</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<pre>9</pre>
</td>
<td>
<pre>$t:result instance of xs:string</pre>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="scenario1-scenario4">
<h3>Test @focus a focused Failure scenario</h3>
<div id="scenario1-scenario4-expect1" class="xTestReport">
<h4 class="xTestReportTitle">must execute the test and return Failure</h4>
<div class="xTestReportHint"><a href="https://github.com/xspec/xspec/wiki/Understanding-Test-Results" target="_blank" title="What does this report mean?">[?]</a></div>
<table class="xspecResult">
<thead>
<tr>
<th>Result</th>
<th>Expecting</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<pre>9</pre>
</td>
<td>
<pre>$t:result instance of xs:string</pre>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>
59 changes: 59 additions & 0 deletions test/end-to-end/cases/expected/query/force-focus_none-result.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.jenitennison.com/xslt/xspec"
xspec="../../force-focus_none.xspec"
query="x-urn:test:do-nothing"
query-at="../../../../do-nothing.xqm"
date="2000-01-01T00:00:00Z">
<scenario id="scenario1" xspec="../../focus-without-pending.xspec">
<label>Test @focus</label>
<input-wrap xmlns="">
<t:call xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
function="exactly-one">
<t:param select="9"/>
</t:call>
</input-wrap>
<scenario id="scenario1-scenario1" xspec="../../focus-without-pending.xspec">
<label>an unfocused Success scenario must be Pending</label>
<result select="9"/>
<test id="scenario1-scenario1-expect1" successful="true">
<label>it would return Success if it were not Pending</label>
<expect select="9"/>
</test>
</scenario>
<scenario id="scenario1-scenario2" xspec="../../focus-without-pending.xspec">
<label>an unfocused Failure scenario must be Pending</label>
<result select="9"/>
<test id="scenario1-scenario2-expect1" successful="false">
<label>it would return Failure if it were not Pending</label>
<expect-test-wrap xmlns="">
<t:expect xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
test="$t:result instance of xs:string"/>
</expect-test-wrap>
<expect select="()"/>
</test>
</scenario>
<scenario id="scenario1-scenario3" xspec="../../focus-without-pending.xspec">
<label>a focused Success scenario</label>
<result select="9"/>
<test id="scenario1-scenario3-expect1" successful="true">
<label>must execute the test and return Success</label>
<expect select="9"/>
</test>
</scenario>
<scenario id="scenario1-scenario4" xspec="../../focus-without-pending.xspec">
<label>a focused Failure scenario</label>
<result select="9"/>
<test id="scenario1-scenario4-expect1" successful="false">
<label>must execute the test and return Failure</label>
<expect-test-wrap xmlns="">
<t:expect xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
test="$t:result instance of xs:string"/>
</expect-test-wrap>
<expect select="()"/>
</test>
</scenario>
</scenario>
</report>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuites name="force-focus_none.xspec">
<testsuite name="Test @focus" tests="4" failures="2">
<testcase name="an unfocused Success scenario must be Pending it would return Success if it were not Pending"
status="passed"/>
<testcase name="an unfocused Failure scenario must be Pending it would return Failure if it were not Pending"
status="failed">
<failure message="expect assertion failed">Expecting: $t:result instance of xs:string</failure>
</testcase>
<testcase name="a focused Success scenario must execute the test and return Success"
status="passed"/>
<testcase name="a focused Failure scenario must execute the test and return Failure"
status="failed">
<failure message="expect assertion failed">Expecting: $t:result instance of xs:string</failure>
</testcase>
</testsuite>
</testsuites>

0 comments on commit aef6fe3

Please sign in to comment.