1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.nuiton.jrst.bugs;
23
24 import org.apache.commons.io.FileUtils;
25 import org.junit.Test;
26 import org.nuiton.jrst.JRST;
27 import org.nuiton.jrst.JRSTAbstractTest;
28
29 import java.io.File;
30
31
32
33
34
35
36 public class ErrorsTest extends JRSTAbstractTest {
37
38
39
40
41
42
43 @Test
44 public void testDisplayErrors() throws Exception {
45 File in = getBugTestFile("testDisplayErrors.rst");
46 File out = getOutputTestFile("jrst-testDisplayErrors.html");
47
48 JRST.generate(JRST.TYPE_HTML, in, out, JRST.Overwrite.ALLTIME, false);
49 String content = FileUtils.readFileToString(out, JRST.UTF_8);
50
51 assertTrue(content.contains("Explicit markup ends without a blank line; unexpected unindent."));
52 assertTrue(content.contains("Literal block ends without a blank line; unexpected unindent."));
53 assertTrue(content.contains("Inline literal start-string without end-string."));
54 assertTrue(content.contains("Duplicate target name, cannot be used as a unique reference: " +
55 "\"dossier contenant tous les fichiers nécessaires à ce plan\"."));
56 }
57 }