@@ -14,58 +14,58 @@ def setup
1414 def test_convert_CROSSREF
1515 result = @to . convert 'C1'
1616
17- assert_equal para ( "<a href=\" C1.html\" >C1 </a>" ) , result
17+ assert_equal para ( "<a href=\" C1.html\" ><code>C1</code> </a>" ) , result
1818 end
1919
2020 def test_convert_CROSSREF_label
2121 result = @to . convert 'C1@foo'
22- assert_equal para ( "<a href=\" C1.html#label-foo\" >foo at C1 </a>" ) , result
22+ assert_equal para ( "<a href=\" C1.html#label-foo\" >foo at <code>C1</code> </a>" ) , result
2323
2424 result = @to . convert 'C1#m@foo'
25- assert_equal para ( "<a href=\" C1.html#method-i-m-label-foo\" >foo at C1#m</a>" ) ,
25+ assert_equal para ( "<a href=\" C1.html#method-i-m-label-foo\" >foo at <code> C1#m</code> </a>" ) ,
2626 result
2727 end
2828
2929 def test_convert_CROSSREF_label_period
3030 result = @to . convert 'C1@foo.'
31- assert_equal para ( "<a href=\" C1.html#label-foo\" >foo at C1 </a>." ) , result
31+ assert_equal para ( "<a href=\" C1.html#label-foo\" >foo at <code>C1</code> </a>." ) , result
3232 end
3333
3434 def test_convert_CROSSREF_label_space
3535 result = @to . convert 'C1@foo+bar'
36- assert_equal para ( "<a href=\" C1.html#label-foo+bar\" >foo bar at C1 </a>" ) ,
36+ assert_equal para ( "<a href=\" C1.html#label-foo+bar\" >foo bar at <code>C1</code> </a>" ) ,
3737 result
3838 end
3939
4040 def test_convert_CROSSREF_section
4141 @c1 . add_section 'Section'
4242
4343 result = @to . convert 'C1@Section'
44- assert_equal para ( "<a href=\" C1.html#Section\" >Section at C1 </a>" ) , result
44+ assert_equal para ( "<a href=\" C1.html#Section\" >Section at <code>C1</code> </a>" ) , result
4545 end
4646
4747 def test_convert_CROSSREF_constant
4848 result = @to . convert 'C1::CONST'
4949
50- assert_equal para ( "<a href=\" C1.html#CONST\" >C1::CONST</a>" ) , result
50+ assert_equal para ( "<a href=\" C1.html#CONST\" ><code> C1::CONST</code> </a>" ) , result
5151 end
5252
5353 def test_convert_RDOCLINK_rdoc_ref
5454 result = @to . convert 'rdoc-ref:C1'
5555
56- assert_equal para ( "<a href=\" C1.html\" >C1 </a>" ) , result
56+ assert_equal para ( "<a href=\" C1.html\" ><code>C1</code> </a>" ) , result
5757 end
5858
5959 def test_convert_RDOCLINK_rdoc_ref_method
6060 result = @to . convert 'rdoc-ref:C1#m'
6161
62- assert_equal para ( "<a href=\" C1.html#method-i-m\" >C1#m</a>" ) , result
62+ assert_equal para ( "<a href=\" C1.html#method-i-m\" ><code> C1#m</code> </a>" ) , result
6363 end
6464
6565 def test_convert_RDOCLINK_rdoc_ref_method_label
6666 result = @to . convert 'rdoc-ref:C1#m@foo'
6767
68- assert_equal para ( "<a href=\" C1.html#method-i-m-label-foo\" >foo at C1#m</a>" ) ,
68+ assert_equal para ( "<a href=\" C1.html#method-i-m-label-foo\" >foo at <code> C1#m</code> </a>" ) ,
6969 result , 'rdoc-ref:C1#m@foo'
7070 end
7171
@@ -75,13 +75,13 @@ def test_convert_RDOCLINK_rdoc_ref_method_percent
7575
7676 result = @to . convert 'rdoc-ref:C1#%'
7777
78- assert_equal para ( "<a href=\" C1.html#method-i-25\" >C1#%</a>" ) , result
78+ assert_equal para ( "<a href=\" C1.html#method-i-25\" ><code> C1#%</code> </a>" ) , result
7979
8080 m . singleton = true
8181
8282 result = @to . convert 'rdoc-ref:C1::%'
8383
84- assert_equal para ( "<a href=\" C1.html#method-c-25\" >C1::%</a>" ) , result
84+ assert_equal para ( "<a href=\" C1.html#method-c-25\" ><code> C1::%</code> </a>" ) , result
8585 end
8686
8787 def test_convert_RDOCLINK_rdoc_ref_method_percent_label
@@ -90,21 +90,21 @@ def test_convert_RDOCLINK_rdoc_ref_method_percent_label
9090
9191 result = @to . convert 'rdoc-ref:C1#%@f'
9292
93- assert_equal para ( "<a href=\" C1.html#method-i-25-label-f\" >f at C1#%</a>" ) ,
93+ assert_equal para ( "<a href=\" C1.html#method-i-25-label-f\" >f at <code> C1#%</code> </a>" ) ,
9494 result
9595
9696 m . singleton = true
9797
9898 result = @to . convert 'rdoc-ref:C1::%@f'
9999
100- assert_equal para ( "<a href=\" C1.html#method-c-25-label-f\" >f at C1::%</a>" ) ,
100+ assert_equal para ( "<a href=\" C1.html#method-c-25-label-f\" >f at <code> C1::%</code> </a>" ) ,
101101 result
102102 end
103103
104104 def test_convert_RDOCLINK_rdoc_ref_label
105105 result = @to . convert 'rdoc-ref:C1@foo'
106106
107- assert_equal para ( "<a href=\" C1.html#label-foo\" >foo at C1 </a>" ) , result ,
107+ assert_equal para ( "<a href=\" C1.html#label-foo\" >foo at <code>C1</code> </a>" ) , result ,
108108 'rdoc-ref:C1@foo'
109109 end
110110
@@ -117,18 +117,18 @@ def test_gen_url
117117 end
118118
119119 def test_handle_regexp_CROSSREF
120- assert_equal "<a href=\" C2/C3.html\" >C2::C3</a>" , REGEXP_HANDLING ( 'C2::C3' )
120+ assert_equal "<a href=\" C2/C3.html\" ><code> C2::C3</code> </a>" , REGEXP_HANDLING ( 'C2::C3' )
121121 end
122122
123123 def test_handle_regexp_CROSSREF_label
124- assert_equal "<a href=\" C1.html#method-i-m-label-foo\" >foo at C1#m</a>" ,
124+ assert_equal "<a href=\" C1.html#method-i-m-label-foo\" >foo at <code> C1#m</code> </a>" ,
125125 REGEXP_HANDLING ( 'C1#m@foo' )
126126 end
127127
128128 def test_handle_regexp_CROSSREF_show_hash_false
129129 @to . show_hash = false
130130
131- assert_equal "<a href=\" C1.html#method-i-m\" >m </a>" ,
131+ assert_equal "<a href=\" C1.html#method-i-m\" ><code>m</code> </a>" ,
132132 REGEXP_HANDLING ( '#m' )
133133 end
134134
@@ -140,11 +140,11 @@ def test_handle_regexp_HYPERLINK_rdoc
140140
141141 link = @to . handle_regexp_HYPERLINK hyper 'C2::C3'
142142
143- assert_equal '<a href="C2/C3.html">C2::C3</a>' , link
143+ assert_equal '<a href="C2/C3.html"><code> C2::C3</code> </a>' , link
144144
145145 link = @to . handle_regexp_HYPERLINK hyper 'C4'
146146
147- assert_equal '<a href="C4.html">C4 </a>' , link
147+ assert_equal '<a href="C4.html"><code>C4</code> </a>' , link
148148
149149 link = @to . handle_regexp_HYPERLINK hyper 'README.txt'
150150
@@ -200,16 +200,16 @@ def test_to_html_CROSSREF_email_hyperlink_all
200200 def test_link
201201 assert_equal 'n' , @to . link ( 'n' , 'n' )
202202
203- assert_equal '<a href="C1.html#method-c-m">m </a>' , @to . link ( 'm' , 'm' )
203+ assert_equal '<a href="C1.html#method-c-m"><code>m</code> </a>' , @to . link ( 'm' , 'm' )
204204 end
205205
206206 def test_link_for_method_traverse
207207 @to = RDoc ::Markup ::ToHtmlCrossref . new @options , 'C2.html' , @c9
208- assert_equal '<a href="C9/A.html#method-i-foo">C9::B#foo</a>' , @to . link ( 'C9::B#foo' , 'C9::B#foo' )
208+ assert_equal '<a href="C9/A.html#method-i-foo"><code> C9::B#foo</code> </a>' , @to . link ( 'C9::B#foo' , 'C9::B#foo' )
209209 end
210210
211211 def test_link_class_method_full
212- assert_equal '<a href="Parent.html#method-c-m">Parent::m</a>' ,
212+ assert_equal '<a href="Parent.html#method-c-m"><code> Parent::m</code> </a>' ,
213213 @to . link ( 'Parent::m' , 'Parent::m' )
214214 end
215215
0 commit comments