-
Notifications
You must be signed in to change notification settings - Fork 4
/
schematron.bats
45 lines (40 loc) · 1.16 KB
/
schematron.bats
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env bats
#===============================================================================
#
# USAGE: bats schematron.bats
#
# DESCRIPTION: Unit tests for 'Schematron/schematron-test' project
#
# INPUT: N/A
#
# OUTPUT: Unit tests results
#
# DEPENDENCIES: This script requires bats (https://github.com/sstephenson/bats)
#
# AUTHOR: Tony Graham
# Blatantly copied from 'XSpec/xspec'
#
# LICENSE: MIT License (https://opensource.org/licenses/MIT)
# See 'LICENSE' in this directory
#
#===============================================================================
#setup() {
# BLAH="blah"
#}
#teardown() {
# BLAH="blah"
#}
@test "schematron/universalTests.xspec" {
run ${XSPEC_HOME}/bin/xspec.sh -s schematron/universalTests.xspec
echo "$output"
[ "$status" -eq 0 ]
[[ "${output}" =~ "failed: 0" ]]
[[ "${output}" =~ "Done." ]]
}
@test "schematron/universalTests-xslt2.xspec" {
run ${XSPEC_HOME}/bin/xspec.sh -s schematron/universalTests-xslt2.xspec
echo "$output"
[ "$status" -eq 0 ]
[[ "${output}" =~ "failed: 0" ]]
[[ "${output}" =~ "Done." ]]
}