From 4381f171dc9e41130fdcca3b64290de8d446902a Mon Sep 17 00:00:00 2001 From: Thomas Leitner Date: Mon, 20 Mar 2023 22:05:08 +0100 Subject: [PATCH] Fix broken tests --- test/test_files.rb | 4 +++- test/testcases/block/04_header/with_header_links.html | 8 +++----- test/testcases/block/04_header/with_header_links.options | 1 + test/testcases/block/04_header/with_header_links.text | 4 +--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/test/test_files.rb b/test/test_files.rb index ff08666d..30e9f3de 100644 --- a/test/test_files.rb +++ b/test/test_files.rb @@ -86,6 +86,7 @@ class TestFiles < Minitest::Test 'test/testcases/span/05_html/mark_element.html', # bc of tidy 'test/testcases/block/09_html/xml.html', # bc of tidy 'test/testcases/span/05_html/xml.html', # bc of tidy + 'test/testcases/block/04_header/with_header_links.html', # because of header_links option ].compact EXCLUDE_HTML_TEXT_FILES = [ 'test/testcases/block/09_html/parse_as_span.htmlinput', @@ -240,6 +241,7 @@ def tidy_output(out) 'test/testcases/span/04_footnote/backlink_inline.html', # bc of mathjax 'test/testcases/block/09_html/standalone_image_in_div.html', # bc of standalone image 'test/testcases/block/09_html/processing_instruction.html', # bc of PI + 'test/testcases/block/04_header/with_header_links.html', # bc of header_links option ].compact Dir[File.dirname(__FILE__) + '/testcases/**/*.html'].each do |html_file| next if EXCLUDE_HTML_KD_FILES.any? {|f| html_file =~ /#{f}$/ } @@ -266,7 +268,7 @@ def tidy_output(out) EXCLUDE_MODIFY = [ 'test/testcases/block/06_codeblock/rouge/multiple.text', # bc of HTMLFormater in options - 'test/testcases/block/04_header/with_header_links.text', # we add an anchor tag + 'test/testcases/block/04_header/with_header_links.text', # bc of header_links option ].compact # Generate test methods for asserting that converters don't modify the document tree. diff --git a/test/testcases/block/04_header/with_header_links.html b/test/testcases/block/04_header/with_header_links.html index 50577fe2..64ae37f4 100644 --- a/test/testcases/block/04_header/with_header_links.html +++ b/test/testcases/block/04_header/with_header_links.html @@ -1,9 +1,7 @@ -

This is a header

+

This is a header

-

12. Another one-1-here

+

12. Another one-1-here

-

Do ^& it now

- -

Header with children

+

Do ^& it now

Header without ID

diff --git a/test/testcases/block/04_header/with_header_links.options b/test/testcases/block/04_header/with_header_links.options index 1627eef5..87f9047c 100644 --- a/test/testcases/block/04_header/with_header_links.options +++ b/test/testcases/block/04_header/with_header_links.options @@ -1 +1,2 @@ :header_links: true +:auto_ids: false diff --git a/test/testcases/block/04_header/with_header_links.text b/test/testcases/block/04_header/with_header_links.text index 39d81da0..0166e29f 100644 --- a/test/testcases/block/04_header/with_header_links.text +++ b/test/testcases/block/04_header/with_header_links.text @@ -1,10 +1,8 @@ -# This is a header +# This is a header {#header} ## 12. Another one-1-here ### Do ^& it now -# Header *with [children](http://example.com)* - # Header without ID {: id=""}