Skip to content

Add failing tests from Erubi test suite#1548

Open
joelhawksley wants to merge 4 commits into
marcoroth:mainfrom
joelhawksley:erubi-tests
Open

Add failing tests from Erubi test suite#1548
joelhawksley wants to merge 4 commits into
marcoroth:mainfrom
joelhawksley:erubi-tests

Conversation

@joelhawksley
Copy link
Copy Markdown
Contributor

As a fun experiment, I had Claude Opus 4.6 re-create the tests from https://github.com/jeremyevans/erubi/blob/master/test/test.rb inside Herb and see if there were any gaps. Of the 105 tests, Herb passed 97 and failed 8.

Category Tests Issue
<%% literal escape 3 Herb doesn't output <%% as literal <% text
trim: false 2 Herb strips whitespace around code/comment tags even when trim: false
Trailing content after %> 1 Herb drops leading whitespace when code tag has trailing content on same line
<% inside string 1 <% x = '<%' %> triggers Herb's HTML parser error
literal_prefix/literal_postfix 1 Custom literal prefix/postfix not supported

I only added the failing tests here, as I'm guessing many of the passing 97 would be duplicative with the existing suite.

Comment thread test/engine/erubi_test_suite_test.rb Outdated
Comment thread test/engine/erubi_test_suite_test.rb Outdated
Co-authored-by: Joel Hawksley <joelhawksley@github.com>
Signed-off-by: Joel Hawksley <joelhawksley@github.com>
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