PageRenderTime 25ms CodeModel.GetById 18ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/test/marks/table.t2t

http://txt2tags.googlecode.com/
Unknown | 84 lines | 65 code | 19 blank | 0 comment | 0 complexity | 254343bc3d63b9f7587ab6be8f24e26f MD5 | raw file
 1
 2%!includeconf: test.conf
 3BODYINIT
 4
 5%%% Syntax: Lines starting with a pipe |
 6| Cell 1
 7
 8%%% Syntax: Extra pipes separate cells
 9| Cell 1 | Cell 2 | Cell 3
10
11%%% Syntax: With a trailing pipe, make border
12| Cell 1 | Cell 2 | Cell 3 |
13
14%%% Syntax: Table lines starting with double pipe are heading
15|| Cell 1 | Cell 2 | Cell 3 |
16
17%%% Align: Spaces before the leading pipe centralize the table
18   | Cell 1 | Cell 2 | Cell 3 |
19
20%%% Align: Spaces inside the cell denote its alignment
21   || Heading | Heading | Heading |
22% comments don't close an opened table   
23   | <-     |   --   |     -> |
24   |   --   |   --   |   --   |
25   |     -> |   --   | <-     |
26
27%%% Span: Column span is defined by extra pipes at cell closing
28   || 1  |  2  |    3+4   ||
29   |  1  |  2  |  3  |  4  |
30   |      1+2+3    |||  4  |
31   |  1  |    2+3   ||  4  |
32   |        1+2+3+4     ||||
33
34%%% Test: Empty cells are placed as expected
35   | 0 | 1 | 2 |   |
36   | 4 | 5 |   | 7 |
37   | 8 |   | A | B |
38   |   | D | E | F |
39
40%%% Test: Lines with different number of cells
41   | 1 |
42   | 1 | 2 |
43   | 1 | 2 | 3 |
44   | 1 | 2 | 3 | 4 |
45   | 1 | 2 | 3 | 4 | 5 |
46
47%%% Test: Empty cells + Span + Messy cell number = Fun!
48   |   Jan |
49   |   Fev ||
50   |   Mar |||
51   |   Apr ||||
52   |   May |||||
53   |  20%  |  40%  |  60%  |  80%  |  100%  |
54
55   |   |     |  /  |     |    |
56   |   |   / / / / /     |||  |
57   |  / / / / / / / / /  |||||
58   |   |  o  |     |  o  |    |
59   |   |     |   . |     |    |
60   |   |    = = = =    |||    |
61
62   | 01 | 02 |    |    | 05 |    | 07 |    |
63   |    |    | 11 |    | 13 |    |    | 16 |
64   | 17 |    | 19 | 20 |    |    | 23 |    |
65   | 25 | 26 |    |    | 29 | 30 |    | 32 |
66   |    |    | 35 |    | 37 |    | 39 | 40 |
67
68%%% Test: Lots of cells at the same line
69| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
70
71%%% Test: Empty lines
72|   |
73|  |
74| |
75
76%%% Invalid: There must be at least one space around the pipe
77|this|is|not|a|table|
78
79|this| is| not| a| table|
80
81|this |is |not |a |table |
82
83%%% Invalid: You must use spaces, not TABs
84|	this	|	is	|	not	|	a	|	table	|