@@ -143,101 +143,4 @@ function TestLinkConfluence:testAttachment()
143143 lu .assertEquals (actual , expected )
144144end
145145
146- TestTableConfluence = {}
147- function TestTableConfluence :testAlign ()
148- local expected = [[ <table>
149- <colgroup>
150- <col width="10%" />
151- </colgroup>
152- <tr class="odd">
153- <td align="right"><p style="text-align: right;">12</p></td>
154- </tr>
155- </table>]]
156- local caption = ' '
157- local aligns = {' AlignRight' }
158- local widths = {0.1 }
159- local headers = {Right }
160- local rows = {
161- {12 }
162- }
163-
164- local actual = confluence .TableConfluence (caption , aligns , widths , headers , rows );
165-
166- lu .assertEquals (actual , expected )
167- end
168- function TestTableConfluence :testColGroup ()
169- local expected = [[ <table>
170- <colgroup>
171- <col width="10%" />
172- <col width="10%" />
173- <col width="10%" />
174- <col width="70%" />
175- </colgroup>
176- <tr class="odd">
177- <td align="right"><p style="text-align: right;">12</p></td>
178- <td align="left"><p style="text-align: left;">12</p></td>
179- <td align="left"><p style="text-align: left;">12</p></td>
180- <td align="center"><p style="text-align: center;">12</p></td>
181- </tr>
182- <tr class="even">
183- <td align="right"><p style="text-align: right;">123</p></td>
184- <td align="left"><p style="text-align: left;">123</p></td>
185- <td align="left"><p style="text-align: left;">123</p></td>
186- <td align="center"><p style="text-align: center;">123</p></td>
187- </tr>
188- <tr class="odd">
189- <td align="right"><p style="text-align: right;">1</p></td>
190- <td align="left"><p style="text-align: left;">1</p></td>
191- <td align="left"><p style="text-align: left;">1</p></td>
192- <td align="center"><p style="text-align: center;">1</p></td>
193- </tr>
194- </table>]]
195- local caption = ' '
196- local aligns = {' AlignRight' , ' AlignLeft' , ' AlignDefault' , ' AlignCenter' }
197- local widths = {0.1 , 0.1 , 0.1 , 0.7 }
198- local headers = {Right , Left , Default , Center }
199- local rows = {
200- {12 , 12 , 12 , 12 },
201- {123 , 123 , 123 , 123 },
202- {1 , 1 , 1 , 1 },
203- }
204- local actual = confluence .TableConfluence (caption , aligns , widths , headers , rows );
205-
206- lu .assertEquals (actual , expected )
207- end
208- function TestTableConfluence :testNoColGroupNoWidth ()
209- local expected = [[ <table>
210- <tr class="odd">
211- <td align="right"><p style="text-align: right;">12</p></td>
212- <td align="left"><p style="text-align: left;">12</p></td>
213- <td align="left"><p style="text-align: left;">12</p></td>
214- <td align="center"><p style="text-align: center;">12</p></td>
215- </tr>
216- <tr class="even">
217- <td align="right"><p style="text-align: right;">123</p></td>
218- <td align="left"><p style="text-align: left;">123</p></td>
219- <td align="left"><p style="text-align: left;">123</p></td>
220- <td align="center"><p style="text-align: center;">123</p></td>
221- </tr>
222- <tr class="odd">
223- <td align="right"><p style="text-align: right;">1</p></td>
224- <td align="left"><p style="text-align: left;">1</p></td>
225- <td align="left"><p style="text-align: left;">1</p></td>
226- <td align="center"><p style="text-align: center;">1</p></td>
227- </tr>
228- </table>]]
229- local caption = ' '
230- local aligns = {' AlignRight' , ' AlignLeft' , ' AlignDefault' , ' AlignCenter' }
231- local widths = {0.0 , 0.0 , 0.0 , 0.0 }
232- local headers = {Right , Left , Default , Center }
233- local rows = {
234- {12 , 12 , 12 , 12 },
235- {123 , 123 , 123 , 123 },
236- {1 , 1 , 1 , 1 },
237- }
238- local actual = confluence .TableConfluence (caption , aligns , widths , headers , rows );
239-
240- lu .assertEquals (actual , expected )
241- end
242-
243146os.exit (lu .LuaUnit .run ())
0 commit comments