slim-template/slim

Test failure: TestSlimTranslator#test_no_translation_of_embedded

Apteryks opened this issue · 2 comments

I also get the following test failure, with the same environment as described in #857.

# Running:

E...

Finished in 0.051535s, 77.6171 runs/s, 135.8298 assertions/s.

  1) Error:
TestSlimTranslator#test_no_translation_of_embedded:
RuntimeError: Missing test for Tilt::PandocTemplate
    /tmp/guix-build-ruby-slim-4.1.0.drv-0/source/test/translator/test_translator.rb:41:in `test_no_translation_of_embedded'

4 runs, 7 assertions, 0 failures, 1 errors, 0 skips
rake aborted!

I also face this when trying to package for Arch Linux

minad commented

In order for the test to succeed, configure a different template engine for Markdown. See

case Tilt['md'].name.downcase
when /redcarpet/
assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n", source, tr_mode: :dynamic
assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n", source, tr_mode: :static
when /rdiscount/
assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n\n", source, tr_mode: :dynamic
assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n\n", source, tr_mode: :static
when /kramdown/
assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n <li>one</li>\n <li>two</li>\n</ul>\n", source, tr_mode: :dynamic
assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<ul>\n <li>one</li>\n <li>two</li>\n</ul>\n", source, tr_mode: :static
else
raise "Missing test for #{Tilt['md']}"
end

We could also add a case for Pandoc to the testsuite. If there is interest, feel free to propose a PR.