1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.nuiton.jrst.bugs;
24
25 import org.apache.commons.io.FileUtils;
26 import org.junit.Test;
27 import org.nuiton.jrst.JRST;
28 import org.nuiton.jrst.JRSTAbstractTest;
29
30 import java.io.File;
31
32
33
34
35
36
37
38
39
40
41 public class TableTest extends JRSTAbstractTest {
42
43
44
45
46
47
48
49 @Test
50 public void testTableSpecialChar() throws Exception {
51 File in = getBugTestFile("testTable1290.rst");
52 File out = getOutputTestFile("jrst-tables.html");
53
54
55 new JRSTTestGenerator(JRST.TYPE_HTML, in, out, JRST.Overwrite.ALLTIME) {
56
57 @Override
58 public void assertJRST(File in, File out) throws Exception {
59 String content = FileUtils.readFileToString(out, JRST.UTF_8);
60 assertTrue(content.indexOf("Annee|Trait|Espece") > 0);
61 assertTrue(content.indexOf("<p>Fatal</p>") > 0);
62 }
63 };
64 }
65
66
67
68
69
70
71 @Test
72 public void testTableIndentation() throws Exception {
73 File in = getBugTestFile("testTable1375.rst");
74 File out = getOutputTestFile("jrst-tables.html");
75
76
77 new JRSTTestGenerator(JRST.TYPE_HTML, in, out, JRST.Overwrite.ALLTIME) {
78
79 @Override
80 public void assertJRST(File in, File out) throws Exception {
81 String content = FileUtils.readFileToString(out, JRST.UTF_8);
82 assertTrue(content.indexOf("<em>légérs</em>") > 0);
83 }
84 };
85 }
86 }