Project

General

Profile

Defect #35892 » fix_common-mark-test.patch

Ko Nagase, 2021-09-25 17:47

View differences:

test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb
147 147
        [^1]: This is the foot note
148 148
      STR
149 149

  
150
      expected = <<~EXPECTED
151
        <p>This is some text<sup><a href="#fn1" id="fnref1">1</a></sup>.</p>
150
      expected = <<~'EXPECTED'
151
        <p>This is some text<sup><a href="#fn\-?1"( id="fnref1")?>1<\/a><\/sup>\.</p>
152 152
         <ol>
153
        <li id="fn1">
154
        <p>This is the foot note <a href="#fnref1">↩</a></p>
155
        </li>
156
        </ol>
153
        <li( id="fn1")?>
154
        <p>This is the foot note <a href="#fnref\-?1"( aria\-label="Back to content")?>↩</a></p>
155
        <\/li>
156
        <\/ol>
157 157
      EXPECTED
158 158

  
159
      assert_equal expected.gsub(%r{[\r\n\t]}, ''), format(text).gsub(%r{[\r\n\t]}, '').rstrip
159
      assert_match %r{#{expected.gsub(%r{[\r\n\t]}, '')}}, format(text).gsub(%r{[\r\n\t]}, '').rstrip
160 160
    end
161 161

  
162 162
    STR_WITH_PRE = [
    (1-1/1)