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

Allow context in named templates #76

Open
wants to merge 107 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
07c0c60
PR-76 issue #66 allow context in named templates
cirulls Feb 21, 2016
26a4292
Merge pull request #1 from cirulls/develop
Feb 21, 2016
b0b3001
expath#40 fix code coverage
Aug 10, 2016
91be55e
Merge branch 'develop'
Aug 10, 2016
4a26210
add Travis CI configuration
Aug 11, 2016
c2fdcad
add sudo required
Aug 11, 2016
daee7d5
install bats from GitHub
Aug 11, 2016
070cde7
# This is a combination of 4 commits.
Aug 14, 2016
3c40268
implement JUnit report (#2)
Aug 14, 2016
feb001c
replace saxon:serialize() with fn:serialize #81
Aug 17, 2016
07fdde6
add support for Saxon-9-1-0-8 (Saxon-B) #79
Aug 17, 2016
bc936b7
rename Saxon B jar file as per standard convention (#79)
Aug 17, 2016
df4959b
run tests with Travis CI (#5)
Aug 11, 2016
7e7199b
update link to Travis status page
Aug 21, 2016
6dc9376
add documentation
Aug 21, 2016
954a5ea
merge feature/junit into develop
Aug 21, 2016
0c7a0a0
Merge branch 'develop'
Aug 21, 2016
08cd006
update Travis config for master
Aug 21, 2016
4d82109
merge branch feature/saxon-b
Aug 21, 2016
1eb4b0c
Merge branch 'develop'
Aug 21, 2016
1a4377e
add XSLT 3.0 support #9 (#10)
Aug 29, 2016
cd47860
Merge branch 'develop'
Aug 29, 2016
116c49c
initial commit for bats test #12
Sep 29, 2016
65d9fc2
update Travis configuration #12
Sep 29, 2016
2b21942
test failing test #12
Sep 29, 2016
be28008
run only bats tests
Sep 29, 2016
7295cba
review bats test suite
Sep 29, 2016
8a41236
set TEST_DIR
Sep 29, 2016
86daf71
modify .travis
Sep 29, 2016
7e821e9
remove export in test without TEST_DIR
Sep 29, 2016
48b3dda
test failing tests
Sep 29, 2016
704b149
run XSpec test suite #12
Sep 29, 2016
46924d1
Fixed TEST_DIR management (#13)
c4s4 Sep 29, 2016
fab22d7
add output when test fails
Sep 29, 2016
7b0af25
update Travis configuration
Sep 29, 2016
f870574
override TEST_DIR when set and add bats test (#12 #13)
Sep 29, 2016
706b4e6
fix typo
Sep 29, 2016
53c2b7a
Merge branch 'develop'
Sep 29, 2016
7f3fef3
Fixed TEST_DIR management for winwdows (#14)
c4s4 Oct 17, 2016
63e1495
print message with location of HTML report (#16)
Oct 17, 2016
fdbcf4c
Bugfix/issue67 (#17)
Oct 30, 2016
7303f0d
Fix travis configuration #19
Dec 3, 2016
86e9bbf
use lazy evaluation to fix data type error (#24)
Dec 10, 2016
dcf41fd
reinstate copyright notes #23
Dec 10, 2016
8931b37
force to return the string value of node to support other data types …
Dec 12, 2016
670fcfe
retrieve saxon from maven repo (#34)
Dec 23, 2016
4449512
runner script for XSpec test suite does not detect compiling issues (…
Dec 27, 2016
5a44674
Fix regression bug introduced in v0.4.0-RC (#38)
Jan 1, 2017
70812b3
Revamp xspec.bat (#28)
AirQuick Jan 3, 2017
fe09541
Run tests on AppVeyor (#41)
AirQuick Jan 4, 2017
67461a0
test/xspec-junit.xspec fails with Saxon 9.6.0.10 (#40)
AirQuick Jan 4, 2017
5d6459b
Test with Saxon n and n-0.1 (#43)
AirQuick Jan 5, 2017
1a92c65
remove -j option in tests #39 (#49)
Jan 8, 2017
2a7057b
Run tests in Travis for both Saxon HE 9.7.0-14 and 9.6.0-7 (#45)
Jan 8, 2017
187f157
Always provide xs:boolean in $impl:successful expression (#48)
AirQuick Jan 8, 2017
ba5f97c
add bats test issue #46 / pr #48 (#51)
Jan 8, 2017
a6bb235
remove old references to xspec.googlecode.com #56
Jan 13, 2017
33684b7
remove old references to google repos #56 (#66)
Jan 14, 2017
82a3d49
Remove output and add directories to .gitignore (#65)
Jan 14, 2017
441eae6
Add tests for issue #46 / pr #48 for Windows (#54)
AirQuick Jan 14, 2017
5aa7644
update README and LICENSE files #52 (#53)
Jan 15, 2017
f2db6e4
Run tests with both Saxon 9.6.0-7 and 9.6.0-10 (#68)
tofi86 Jan 16, 2017
9b94529
Report all the basic types and valid numeric expressions (#58)
AirQuick Jan 19, 2017
01c7e25
Keep type annotations in $impl:test-items (#63)
AirQuick Feb 1, 2017
72a4c71
Run tests with Saxon 9.7.0-15 (#77)
AirQuick Feb 14, 2017
ad6b041
Revert harnesses to v0.3.0 and add UTF-8 encoding #74 #72 (#76)
Feb 16, 2017
bae9ce1
Consolidate cleanup tasks in batch script(#73)
AirQuick Mar 4, 2017
cd1908a
Highlight the link target (#79)
AirQuick Mar 4, 2017
ef2d44c
Run XProc test on AppVeyor (#86)
AirQuick Mar 7, 2017
f4811a5
Align Travis configuration with AppVeyor in #86 (#96)
Mar 7, 2017
a5ceb3a
Get the URLs back, adapted.
fgeorges Mar 7, 2017
a93e273
Fix indent.
fgeorges Mar 7, 2017
388c62e
Revive @assert and @context.
fgeorges Mar 7, 2017
74c9f0c
Merge branch 'master' of github.com:xspec/xspec
fgeorges Mar 7, 2017
8946ab5
revert to commit f4811a5 as tests are failing on master #97 (#101)
Mar 15, 2017
74312e1
add XProc harness for Saxon from v0.4.0 (#108)
Mar 15, 2017
2f71caa
Display result.log on test failure (#110)
AirQuick Mar 29, 2017
359b721
Update Saxon versions (#116)
AirQuick Apr 8, 2017
e99b5a2
Make XProc testing command lines more portable (#98)
AirQuick Apr 8, 2017
120b331
Separate common tests (for XSLT and XQuery) from generate-tests-utils…
AirQuick Apr 9, 2017
0ef7b8c
Added documentation for attributes in RNG schema (#115)
raducoravu Apr 10, 2017
cb4b235
Migrate test:tests to test/*.xspec (#118)
AirQuick Apr 10, 2017
701bd34
Stop using functx namespace (#104)
AirQuick Apr 16, 2017
a2b8e59
Do not copy unused namespaces from format utils to output (#91)
AirQuick Apr 16, 2017
9f28df6
xspec.bat (Windows) fails when path contains parentheses
AirQuick Apr 16, 2017
4e99c1d
Escape apostrophe in URI (#119)
Apr 17, 2017
942e26f
Run tests with XML Calabash 1.1.16-97 (#123)
AirQuick Apr 20, 2017
1101540
add checks for saxon script + test (#124)
Apr 22, 2017
6b6d07b
add Schematron support (#105)
vincentml May 4, 2017
e318391
Add documentation for Schematron support (#129)
May 25, 2017
436ceb0
add XProc harness for BaseX standalone (review #103) (#136)
Jun 10, 2017
c25a849
From pull request #129 discussion: suppress warning message and clean…
vincentml Jun 26, 2017
a602c4b
Allow Schematron XSLTs to be provided externally (#133)
vincentml Jun 26, 2017
a032c19
End-to-end test for XSpec itself (#81)
AirQuick Aug 29, 2017
73aa6f9
Add TODO comments for focus/pending tests in #4 (#61)
AirQuick Aug 30, 2017
cc3a18b
Run tests with latest Saxon HE 9.7 maintenance release (9.7.0.20) (#146)
AirQuick Aug 31, 2017
9608693
Add end-to-end tests for testing failing and pending functionalities
AirQuick Oct 1, 2017
5f2cf8c
Remove JAVA_OPTIONS message from output in Travis (#148)
Oct 1, 2017
4031674
Replace regression tests for #50 and #55 as end-to-end tests (#145)
AirQuick Oct 1, 2017
7205f22
Balisage improvements to Schematron support (#149)
vincentml Nov 6, 2017
78f63a6
Run tests with Saxon 9.8.0.7, 9.7.0.21 and 9.7.0.19 (#157)
AirQuick Dec 28, 2017
c76d4fd
Improvements to HTML report (#135)
vincentml Jan 7, 2018
ffd5eda
Add tests for CSS inline (#159)
Jan 24, 2018
63cf95d
Add Ant build support for Schematron (#160)
Feb 4, 2018
c9fdb91
Add a pom file to publish XSpec as a Maven artifact (#156)
cmarchand Mar 18, 2018
b5707e9
Include path to the test source files in all report formats (#188)
vincentml Apr 2, 2018
0e21fca
Enhance coverage-report.xsl to be able to specify css location (#194)
cmarchand Apr 9, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
target/
.idea/
*.iml
test/result.log
**/xspec/*
*-result.html
*-report.html
57 changes: 57 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
language: generic
env:
global:
# full path to Saxon jar
- SAXON_CP=/tmp/xspec/saxon/saxon9he.jar
# Ant version used in oXygen
- ANT_VERSION=1.9.8
# full path to XML Resolver jar
- XML_RESOLVER_CP=/tmp/xspec/xml-resolver/xml-resolver.jar
matrix:
# latest Saxon 9.8 version
- SAXON_VERSION=9.8.0-7
# latest Saxon 9.7 version
- SAXON_VERSION=9.7.0-21
XMLCALABASH_VERSION=1.1.16-97
BASEX_VERSION=8.6.4
# Saxon version used in oXygen
- SAXON_VERSION=9.7.0-19

before_install:
- unset _JAVA_OPTIONS

before_script:
# install Saxon
- curl -fsSL --create-dirs -o ${SAXON_CP} http://central.maven.org/maven2/net/sf/saxon/Saxon-HE/${SAXON_VERSION}/Saxon-HE-${SAXON_VERSION}.jar
# install XML Calabash
- if [ -z ${XMLCALABASH_VERSION} ]; then
echo "XMLCalabash will not be installed as it uses a higher version of Saxon";
else
curl -fsSL --create-dirs -o /tmp/xspec/xmlcalabash/xmlcalabash.zip https://github.com/ndw/xmlcalabash1/releases/download/${XMLCALABASH_VERSION}/xmlcalabash-${XMLCALABASH_VERSION}.zip;
unzip /tmp/xspec/xmlcalabash/xmlcalabash.zip -d /tmp/xspec/xmlcalabash;
export XMLCALABASH_CP=/tmp/xspec/xmlcalabash/xmlcalabash-${XMLCALABASH_VERSION}/xmlcalabash-${XMLCALABASH_VERSION}.jar;
fi
# install BaseX
- if [[ -z ${XMLCALABASH_VERSION} && -z ${BASEX_VERSION} ]]; then
echo "BaseX will not be installed as it requires to run XMLCalabash with a higher version of Saxon";
else
export BASEX_CP=/tmp/xspec/basex/basex.jar;
curl -fsSL --create-dirs -o ${BASEX_CP} http://files.basex.org/maven/org/basex/basex/${BASEX_VERSION}/basex-${BASEX_VERSION}.jar;
fi
# install Ant
- curl -fsSL --create-dirs -o /tmp/xspec/ant/ant.tar.gz http://archive.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz
- tar xf /tmp/xspec/ant/ant.tar.gz -C /tmp/xspec/ant;
- export PATH=/tmp/xspec/ant/apache-ant-${ANT_VERSION}/bin:{$PATH}
# install XML Resolver
- curl -fsSL --create-dirs -o ${XML_RESOLVER_CP} http://central.maven.org/maven2/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar

script:
- ant -version
- cd test
- echo "execute bats unit tests"
- bats --tap xspec.bats
- echo "execute XSpec unit tests"
- ./run-xspec-tests.sh
- echo "execute XSpec end-to-end tests"
- cd end-to-end
- ./run-e2e-tests.sh
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2008, 2010 Jeni Tennison
Copyright (c) 2008-2017 Jeni Tennison

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE.
40 changes: 15 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,26 @@
## XSpec
[![Travis Build Status](https://api.travis-ci.org/xspec/xspec.svg?branch=master "Travis Build Status")](https://travis-ci.org/xspec/xspec)
[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/github/xspec/xspec?branch=master&svg=true "AppVeyor Build Status")](https://ci.appveyor.com/project/xspec/xspec/branch/master)

Version 0.4.0.
## XSpec [![Release](https://img.shields.io/github/release/xspec/xspec.svg)](https://github.com/xspec/xspec/releases/latest)

XSpec is a [Behaviour Driven Development](http://en.wikipedia.org/wiki/Behavior_Driven_Development)
(BDD) framework for XSLT and XQuery. It is based on the Spec
framework of [RSpec](http://rspec.info/), which is a BDD framework for
Ruby.
XSpec is a unit test and [behaviour driven development](http://en.wikipedia.org/wiki/Behavior_Driven_Development) (BDD) framework for XSLT and XQuery. It is based on the Spec framework of [RSpec](http://rspec.info/), which is a BDD framework for Ruby.

XSpec consists of a syntax for describing the behaviour of your XSLT
or XQuery code, and some code that enables you to test your code
against those descriptions.
XSpec consists of a syntax for describing the behaviour of XSLT or XQuery code and some code that enables to test the code against those descriptions.

Maven plugins for running XSpec tests as part of a build are available from [adamretter](http://github.com/adamretter/xspec-maven-plugin) and [daisy](http://github.com/daisy/xspec-maven-plugin).
## Getting Started

An external project, [jxsl](http://code.google.com/p/jxsl/), provides
a Maven archetype for XSpec (Ant is expected soon). The goal is to
provide everything needed to integrate with Continuous Integration
tools for Java (like Hudson, Cruise Control, etc.) See Benoit's
[presentation at Balisage 2011](http://www.balisage.net/Proceedings/vol7/html/Mercier01/BalisageVol7-Mercier01.html)
in Montreal for more info.
To get started, check out the installation instructions for [MacOS/Linux](https://github.com/xspec/xspec/wiki/Installation-on-Mac-and-Linux) and [Windows](https://github.com/xspec/xspec/wiki/Installation-on-Windows) and how to [write your first XSpec test](https://github.com/xspec/xspec/wiki/Getting-Started).

The project owners are Jeni Tennison and Florent Georges.
## Support

### Usage:
Check out the XSpec documentation in the [wiki](https://github.com/xspec/xspec/wiki) before raising an issue or ask a question. If you have any question which is not answered in the wiki, feel free to [raise an issue](https://github.com/xspec/xspec/issues) or post it in the [XSpec discussion list](http://groups.google.com/group/xspec-users).

For more information about using XSpec, visit the project wiki at
<https://github.com/expath/xspec/wiki>. If you have any questions,
you can also join (or search the archives of) the XSpec discussion
list: <http://groups.google.com/group/xspec-users>.
## Contribute

XSpec is an open source project originally written by [Jeni Tennison](https://github.com/JeniT). It was maintained in the past years by [Florent Georges](https://github.com/fgeorges). Active development of XSpec restarted in 2016 and the project is currently maintained by [Sandro Cirulli](https://github.com/cirulls) with the help of the XSpec community.

### License:
If you wish to contribute to XSpec, [raise or pick up an issue](https://github.com/xspec/xspec/issues) and [send us your pull requests](https://github.com/xspec/xspec/pulls). Please document any issue with examples of your XSpec code.

XSpec is released under the MIT license. For a copy of this license,
see [LICENSE](LICENSE), or go to <http://www.opensource.org/licenses/mit-license.php>.
## License

XSpec is released under the [MIT License](LICENSE). [Few parts of the codebase](https://github.com/xspec/xspec/blob/master/java/com/jenitennison/xslt/tests/XSLTCoverageTraceListener.java) are released under the [Mozilla Public License](http://www.mozilla.org/MPL/).
77 changes: 77 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
environment:
global:
# full path to Saxon jar
SAXON_CP: '%TEMP%\xspec\saxon\saxon9he.jar'
# Ant version used in oXygen
ANT_VERSION: 1.9.8
# full path to XML Resolver jar
XML_RESOLVER_CP: '%TEMP%\xspec\xml-resolver\xml-resolver.jar'
matrix:
# latest Saxon 9.8 version
- SAXON_VERSION: 9.8.0-7
# latest Saxon 9.7 version
- SAXON_VERSION: 9.7.0-21
XMLCALABASH_VERSION: 1.1.16-97
# Saxon version used in oXygen
- SAXON_VERSION: 9.7.0-19

install:
- ps: >-
# install Saxon

curl.exe -fsSL --create-dirs -o "${env:SAXON_CP}" "http://central.maven.org/maven2/net/sf/saxon/Saxon-HE/${env:SAXON_VERSION}/Saxon-HE-${env:SAXON_VERSION}.jar"


# install XML Calabash

if( -Not( Test-Path -Path env:\XMLCALABASH_VERSION ) ) {
echo "XMLCalabash will not be installed as it uses a higher version of Saxon"
}

else {
curl.exe -fsSL --create-dirs -o "${env:TEMP}\xspec\xmlcalabash\xmlcalabash.zip" "https://github.com/ndw/xmlcalabash1/releases/download/${env:XMLCALABASH_VERSION}/xmlcalabash-${env:XMLCALABASH_VERSION}.zip"
7z x "${env:TEMP}\xspec\xmlcalabash\xmlcalabash.zip" -o"${env:TEMP}\xspec\xmlcalabash"
${env:XMLCALABASH_CP} = "${env:TEMP}\xspec\xmlcalabash\xmlcalabash-${env:XMLCALABASH_VERSION}\xmlcalabash-${env:XMLCALABASH_VERSION}.jar"
}


# install Ant without installing JDK

choco install ant --ignore-dependencies --no-progress --version "${env:ANT_VERSION}"


# install XML Resolver

curl.exe -fsSL --create-dirs -o "${env:XML_RESOLVER_CP}" "http://central.maven.org/maven2/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar"
build: off
test_script:
- cmd: >-
rem Print Java version

java -version


rem Print Ant version

ant -version


rem Print Saxon version

java -cp "%SAXON_CP%" net.sf.saxon.Transform 2>&1 | find /i "saxon-"


rem execute xspec.bat unit tests

test\xspec-bat.cmd


rem execute XSpec unit tests

test\run-xspec-tests.cmd


rem execute XSpec end-to-end tests

test\end-to-end\run-e2e-tests.cmd
deploy: off
Loading