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: check error code lines with regex in Bats #847

Merged
merged 9 commits into from
Mar 19, 2020

Conversation

AirQuick
Copy link
Member

@AirQuick AirQuick commented Mar 18, 2020

Saxon 10 changed the way it prints errors.

Printing error(xs:QName('errCode'), 'errDescription') is changed as follows.

-  errCode: errDescription
+  errCode  errDescription

To get ready for that change in Bats test, this pull request replaces some checks with regular expression. Also, to make future changes easier, this pull request wraps some existing regular expression tests in a helper function.

c8a1e40 is a temporary commit to verify that the regular expression is still able to detect test failures.

@AirQuick AirQuick added the test label Mar 18, 2020
@AirQuick AirQuick added this to the v1.6.0 milestone Mar 18, 2020
@commit-lint
Copy link

commit-lint bot commented Mar 18, 2020

Tests

  • store error code regex in variable in xspec.bats (15a6a0c)
  • store error code line in variable in xspec.bats (5820414)
  • check error code lines with regex in Bats (f66bbae)
  • use helper function instead of regex variable (c582c16)

Continuous Integration

  • add Saxon 10.0 to CI matrix (c8a1e40)

Contributors

@AirQuick

@AirQuick
Copy link
Member Author

With the temporary commit, Bats test failed at the regular expression tests on Azure Pipelines and Travis CI only on Saxon 10, which effectively verified this PR.

@AirQuick AirQuick merged commit d4143c6 into xspec:master Mar 19, 2020
@AirQuick AirQuick deleted the bats-regex-for-saxon-10 branch March 19, 2020 18:12
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.

None yet

1 participant