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

test: remove overused run from Bats #1515

Merged
merged 2 commits into from
Aug 3, 2021

Conversation

AirQuick
Copy link
Member

@AirQuick AirQuick added the test label Jul 24, 2021
@AirQuick AirQuick added this to the v2.2 milestone Jul 24, 2021
@AirQuick
Copy link
Member Author

AirQuick commented Aug 3, 2021

For testing purposes, I changed this line:

 @test "SAXON_CP has precedence over SAXON_HOME" {
     export SAXON_HOME="${work_dir}/empty-saxon-home ${RANDOM}"
     mkdir "${SAXON_HOME}"
 
-    ../bin/xspec.sh ../tutorial/escape-for-regex.xspec
+    ../bin/xspec.sh -e ../tutorial/escape-for-regex.xspec
 }

and verified that the test failed:

$ test/run-bats.sh --filter "SAXON_CP"
 ✗ SAXON_CP has precedence over SAXON_HOME
   (in test file xspec.bats, line 169)
     `../bin/xspec.sh -e ../tutorial/escape-for-regex.xspec' failed
   Creating XSpec Directory at /tmp/xspec/bats_work/output_32447...
   
   Creating Test Stylesheet...
    
   
   Running Tests...
   Testing with SAXON HE 9.9.1.8
   No escaping
   Must not be escaped at all
   Test simple patterns
   ..When encountering parentheses
   escape them.
   ..When encountering a whitespace character class
   escape the backslash
   result should have one more character than source
   When processing a list of phrases
   All phrase elements should remain
   Strings should be escaped and status attributes should be added
         FAILED
   
   Formatting Report...
   passed: 5 / pending: 0 / failed: 1 / total: 6
   Report available at /tmp/xspec/bats_work/output_32447/escape-for-regex-result.html
   
   *** Found a test failure

1 test, 1 failure

@AirQuick AirQuick merged commit 96d3e99 into xspec:master Aug 3, 2021
@AirQuick AirQuick deleted the not-overuse-run-in-bats branch August 3, 2021 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant