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

Failures cannot be tested #48

Open
GoogleCodeExporter opened this issue Jun 8, 2015 · 1 comment
Open

Failures cannot be tested #48

GoogleCodeExporter opened this issue Jun 8, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

I cannot test if <xsl:message terminate="yes"/> is executed as expected. In the 
current framework, it completely falls over, and the test is completely broken. 
 Since it is a part of the language, it would be good to be able to test for it.

Original issue reported on code.google.com by fou...@googlemail.com on 11 May 2012 at 2:02

@tgraham-antenna
Copy link
Member

@yamahito and I were talking about this last night. One way could be to replace every xsl:message with an xsl:element that creates, say, either an xsl:message or an x:message element in the result. The @terminate would become an attribute of the created element. XSpec could then remove any output after a <*:message terminate="yes"> before evaluating any expectations.

However, this wouldn't work very well if the tested stylesheet wrote output to secondary output files and the expectations were against the content of those files.

Things could also break if the tested stylesheet had xsl:message before an xsl:attribute, but hopefully (a) most users would be able to change their stylesheets, and (b) creating the attribute before terminating isn't too computationally expensive for production use and doesn't introduce changes in external state that shouldn't happen when the transform fails.

innovimax pushed a commit to innovimax/xspec that referenced this issue Jan 17, 2017
innovimax pushed a commit to innovimax/xspec that referenced this issue Jan 17, 2017
innovimax pushed a commit to innovimax/xspec that referenced this issue Jan 17, 2017
* Add test case for Windows batch script for issue expath#46 / pr expath#48
* Align batch script with shell script to mimic setup/teardown functions in batch script (82a3d49)
- Use the same output dir and file as the shell script for .gitignore to fully take effect on windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants