-
Notifications
You must be signed in to change notification settings - Fork 25
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
Reuse tests from asciidoctor? #79
Comments
hello @raghur and thanks for suggesting this. Actually, I've been working on a CLI that is still a in a WIP here: #78, but I guess that could be a start. For now, I have to admin that I've been using asciidoctor to produce the |
So I asked the question on the asciidoctor repo and their advice is to consider only the feature tests. I think it'll still be interesting to try and see how many tests fail. It'd also serve as a quantifiable way to measure completeness and I think it might help people (like me ;)) who want to contribute if there's a set failing tests that they need to make pass to build out a asciidoc feature. So is there anything holding up the pr #78? I'd be willing to help - but I'm quite new to Go (though not totally new) |
@raghur well, for instance, I would like to add a few tests on the command. But you could probably get started before that, by pulling the code from the branch. |
@xcoulon so I'm now able to run asciidoctor ruby tests with libasciidoc in a very hacky way :)... it's also noisy and imperfect - but you can see a log here for text_test.rb |
@raghur this is interesting! I wonder if there's a way to provide some sort of "coverage" or percentage of compliance with the asciidoctor tests ? Ideally by category (eg, passthrough, etc.), so it would help triaging the remaining work to do. |
Create a basic framework for adding test fixtures. The workflow is to add .adoc files to the fixtures folder with corresponding .html files to act as the "golden" HTML output. Include files are in the includes sub-folder so as to differentiate them from the main fixture files. Failed tests show a diff against the golden output. Tests are currently hidden behind a "fixtures" build tag. Use "-tags=fixtures" when running tests to activate. The existing test fixtures are mostly taken from the asciidoctor test fixtures. The golden files were generated with asciidoctor v1.5.7.1 using the "-s" option. Updates bytesparadise#79
What do you think about reusing tests from asciidoctor to check for compatibility? asciidoctor seems to have a rich set of tests.
While the tests are in ruby/rspec etc (I know very little of ruby myself) - but a quick pass at their tests seems to indicate that the tests go through a helper here
https://github.com/asciidoctor/asciidoctor/blob/master/test/test_helper.rb#L179
If libasciidoc had a cli exposing methods to parse document fragments, then in theory, it should be a simple matter to make the tests work.
Thoughts?
The text was updated successfully, but these errors were encountered: