Skip to content

Commit

Permalink
Remove output and add directories to .gitignore (expath#65)
Browse files Browse the repository at this point in the history
* remove output and set up and clean test environment  expath#57 expath#64

- remove directories containing output of XSpec unit tests
- add directories and files to .gitignore 
- set up and clean the bats testing environment
  • Loading branch information
Sandro Cirulli committed Jan 14, 2017
1 parent 33684b7 commit 82a3d49
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 945 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
target/
.idea/
*.iml
test/xspec/*
tutorial/xspec/*
test/result.log
19 changes: 17 additions & 2 deletions test/xspec.bats
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
#
#===============================================================================

setup() {
mkdir ../tutorial/xspec
mkdir ../test/xspec
}


teardown() {
rm -rf ../tutorial/xspec
rm -rf ../test/xspec
}


@test "invoking xspec without arguments prints usage" {
run ../bin/xspec.sh
echo $output
Expand Down Expand Up @@ -70,13 +82,12 @@
}


# this test must run first to create xspec directory
@test "invoking code coverage with Saxon9EE creates test stylesheet" {
export SAXON_CP=/path/to/saxon9ee.jar
run ../bin/xspec.sh -c ../tutorial/escape-for-regex.xspec
echo $output
[ "$status" -eq 1 ]
[ "${lines[2]}" = "Creating Test Stylesheet..." ]
[ "${lines[1]}" = "Creating Test Stylesheet..." ]
}


Expand All @@ -96,13 +107,15 @@
[ "$status" -eq 0 ]
}


@test "invoking xspec generates HTML report file" {
run ../bin/xspec.sh ../tutorial/escape-for-regex.xspec
run stat ../tutorial/xspec/escape-for-regex-result.html
echo $output
[ "$status" -eq 0 ]
}


@test "invoking xspec with -j option with Saxon8 returns error message" {
export SAXON_CP=/path/to/saxon8.jar
run ../bin/xspec.sh -j ../tutorial/escape-for-regex.xspec
Expand All @@ -128,13 +141,15 @@
[ "${lines[18]}" = "Report available at ../tutorial/xspec/escape-for-regex-junit.xml" ]
}


@test "invoking xspec with -j option generates XML report file" {
run ../bin/xspec.sh -j ../tutorial/escape-for-regex.xspec
run stat ../tutorial/xspec/escape-for-regex-result.xml
echo $output
[ "$status" -eq 0 ]
}


@test "invoking xspec with -j option generates JUnit report file" {
run ../bin/xspec.sh -j ../tutorial/escape-for-regex.xspec
run stat ../tutorial/xspec/escape-for-regex-junit.xml
Expand Down
88 changes: 0 additions & 88 deletions test/xspec/xspec-junit-result.html

This file was deleted.

111 changes: 0 additions & 111 deletions test/xspec/xspec-junit-result.xml

This file was deleted.

0 comments on commit 82a3d49

Please sign in to comment.