You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a problem with the test code of the ruby-slim-5.2.1-2 package. The package build failed under both the riscv64 and x86-64 architectures. According to the log output, the /core/test_embedded_engines test file reported an error when entering the test phase.
My operating environment is an x86-64 environment virtual machine and a riscv64 chroot environment of the arch architecture of Windows WSL.
The process is as follows:
I cloned your project and installed the dependencies
run MT_COMPAT="true" GEM_HOME="tmp_install/${_gemdir}" rake test
3.wait for it and found the error
Patch
I modified the test file. Here are my ideas for modification:
This is the relevant code for the error in the test of /test/core/test_embedded_engines.rb
def test_render_with_markdown
source = %q{
markdown:
#Header
Hello from #{"Markdown!"}
#{1+2}
[#{1}](#{"#2"})
* one
* two
}
if ::Tilt['md'].name =~ /Redcarpet/
# redcarpet
assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<p><a href=\"#2\">1</a></p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n", source
elsif ::Tilt['md'].name =~ /RDiscount/
# rdiscount
assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<p><a href=\"#2\">1</a></p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n\n", source
else
# kramdown, :auto_ids by default
assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<p><a href=\"#2\">1</a></p>\n\n<ul>\n <li>one</li>\n <li>two</li>\n</ul>\n", source
Slim::Embedded.with_options(markdown: {auto_ids: false}) do
assert_html "<h1>Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<p><a href=\"#2\">1</a></p>\n\n<ul>\n <li>one</li>\n <li>two</li>\n</ul>\n", source
end
assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<p><a href=\"#2\">1</a></p>\n\n<ul>\n <li>one</li>\n <li>two</li>\n</ul>\n", source
end
end
After debugging, I found that
This test example has a formatting problem. The header is followed by #, which the md document cannot recognize, so the conversion to the html document is also wrong. The actual and expected values of the <li> list are only one space indented, which has no effect on the html conversion. Maybe this test file can be looser, or the indentation can be manually added in the function implementation document.
I change the test file
def test_render_with_markdown
source = %q{
markdown:
# Header
Hello from #{"Markdown!"}
#{1+2}
[#{1}](#{"#2"})
* one
* two
}
if ::Tilt['md'].name =~ /Redcarpet/
# redcarpet
assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<p><a href=\"#2\">1</a></p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n", source
elsif ::Tilt['md'].name =~ /RDiscount/
# rdiscount
assert_html "<h1>Header</h1>\n\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<p><a href=\"#2\">1</a></p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n\n", source
else
# kramdown, :auto_ids by default
assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n<p>3</p>\n<p><a href=\"#2\">1</a></p>\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>", source
Slim::Embedded.with_options(markdown: {auto_ids: false}) do
assert_html "<h1>Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<p><a href=\"#2\">1</a></p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n", source
end
assert_html "<h1 id=\"header\">Header</h1>\n<p>Hello from Markdown!</p>\n<p>3</p>\n<p><a href=\"#2\">1</a></p>\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n", source
end
end
The previous error was solved, but another error was followed
Slim::Embedded.with_options(markdown: {auto_ids: false}) do
assert_html "<h1>Header</h1>\n<p>Hello from Markdown!</p>\n\n<p>3</p>\n\n<p><a href=\"#2\">1</a></p>\n\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>\n", source
I think the function to make the auto_ids: false ,may have some problems that need further Improvements.
Do you think this is a good career change? If you think it is, I will open a PR.
The text was updated successfully, but these errors were encountered:
Description:
There is a problem with the test code of the ruby-slim-5.2.1-2 package. The package build failed under both the riscv64 and x86-64 architectures. According to the log output, the /core/test_embedded_engines test file reported an error when entering the test phase.
ruby-slim-5.2.1-2-riscv64-check.log
ruby-slim-5.2.1-2-x86_64-check.log
My operating environment is an x86-64 environment virtual machine and a riscv64 chroot environment of the arch architecture of Windows WSL.
The process is as follows:
MT_COMPAT="true" GEM_HOME="tmp_install/${_gemdir}" rake test
3.wait for it and found the error
Patch
I modified the test file. Here are my ideas for modification:
This is the relevant code for the error in the test of /test/core/test_embedded_engines.rb
After debugging, I found that
This test example has a formatting problem. The header is followed by #, which the md document cannot recognize, so the conversion to the html document is also wrong. The actual and expected values of the <li> list are only one space indented, which has no effect on the html conversion. Maybe this test file can be looser, or the indentation can be manually added in the function implementation document.
I change the test file
The previous error was solved, but another error was followed
and the code is
I think the function to make the auto_ids: false ,may have some problems that need further Improvements.
Do you think this is a good career change? If you think it is, I will open a PR.
The text was updated successfully, but these errors were encountered: