unknown_command_with_braces.pl 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. use vars qw(%result_texis %result_texts %result_trees %result_errors
  2. %result_indices %result_sectioning %result_nodes %result_menus
  3. %result_floats %result_converted %result_converted_errors
  4. %result_elements %result_directions_text);
  5. use utf8;
  6. $result_trees{'unknown_command_with_braces'} = {
  7. 'contents' => [
  8. {
  9. 'contents' => [
  10. {
  11. 'parent' => {},
  12. 'text' => 'Unknown thing
  13. '
  14. }
  15. ],
  16. 'parent' => {},
  17. 'type' => 'paragraph'
  18. },
  19. {
  20. 'parent' => {},
  21. 'text' => '
  22. ',
  23. 'type' => 'empty_line'
  24. },
  25. {
  26. 'contents' => [
  27. {
  28. 'parent' => {},
  29. 'text' => 'Unknown macro first paragraph
  30. '
  31. }
  32. ],
  33. 'parent' => {},
  34. 'type' => 'paragraph'
  35. },
  36. {
  37. 'parent' => {},
  38. 'text' => '
  39. ',
  40. 'type' => 'empty_line'
  41. },
  42. {
  43. 'contents' => [
  44. {
  45. 'parent' => {},
  46. 'text' => 'second paragraph
  47. '
  48. }
  49. ],
  50. 'parent' => {},
  51. 'type' => 'paragraph'
  52. },
  53. {
  54. 'parent' => {},
  55. 'text' => '
  56. ',
  57. 'type' => 'empty_line'
  58. },
  59. {
  60. 'contents' => [
  61. {
  62. 'parent' => {},
  63. 'text' => ' first paragraph
  64. '
  65. }
  66. ],
  67. 'parent' => {},
  68. 'type' => 'paragraph'
  69. },
  70. {
  71. 'parent' => {},
  72. 'text' => '
  73. ',
  74. 'type' => 'empty_line'
  75. },
  76. {
  77. 'contents' => [
  78. {
  79. 'parent' => {},
  80. 'text' => 'second paragraph
  81. '
  82. }
  83. ],
  84. 'parent' => {},
  85. 'type' => 'paragraph'
  86. },
  87. {
  88. 'parent' => {},
  89. 'text' => '
  90. ',
  91. 'type' => 'empty_line'
  92. },
  93. {
  94. 'contents' => [
  95. {
  96. 'parent' => {},
  97. 'text' => 'third
  98. '
  99. }
  100. ],
  101. 'parent' => {},
  102. 'type' => 'paragraph'
  103. }
  104. ],
  105. 'type' => 'text_root'
  106. };
  107. $result_trees{'unknown_command_with_braces'}{'contents'}[0]{'contents'}[0]{'parent'} = $result_trees{'unknown_command_with_braces'}{'contents'}[0];
  108. $result_trees{'unknown_command_with_braces'}{'contents'}[0]{'parent'} = $result_trees{'unknown_command_with_braces'};
  109. $result_trees{'unknown_command_with_braces'}{'contents'}[1]{'parent'} = $result_trees{'unknown_command_with_braces'};
  110. $result_trees{'unknown_command_with_braces'}{'contents'}[2]{'contents'}[0]{'parent'} = $result_trees{'unknown_command_with_braces'}{'contents'}[2];
  111. $result_trees{'unknown_command_with_braces'}{'contents'}[2]{'parent'} = $result_trees{'unknown_command_with_braces'};
  112. $result_trees{'unknown_command_with_braces'}{'contents'}[3]{'parent'} = $result_trees{'unknown_command_with_braces'};
  113. $result_trees{'unknown_command_with_braces'}{'contents'}[4]{'contents'}[0]{'parent'} = $result_trees{'unknown_command_with_braces'}{'contents'}[4];
  114. $result_trees{'unknown_command_with_braces'}{'contents'}[4]{'parent'} = $result_trees{'unknown_command_with_braces'};
  115. $result_trees{'unknown_command_with_braces'}{'contents'}[5]{'parent'} = $result_trees{'unknown_command_with_braces'};
  116. $result_trees{'unknown_command_with_braces'}{'contents'}[6]{'contents'}[0]{'parent'} = $result_trees{'unknown_command_with_braces'}{'contents'}[6];
  117. $result_trees{'unknown_command_with_braces'}{'contents'}[6]{'parent'} = $result_trees{'unknown_command_with_braces'};
  118. $result_trees{'unknown_command_with_braces'}{'contents'}[7]{'parent'} = $result_trees{'unknown_command_with_braces'};
  119. $result_trees{'unknown_command_with_braces'}{'contents'}[8]{'contents'}[0]{'parent'} = $result_trees{'unknown_command_with_braces'}{'contents'}[8];
  120. $result_trees{'unknown_command_with_braces'}{'contents'}[8]{'parent'} = $result_trees{'unknown_command_with_braces'};
  121. $result_trees{'unknown_command_with_braces'}{'contents'}[9]{'parent'} = $result_trees{'unknown_command_with_braces'};
  122. $result_trees{'unknown_command_with_braces'}{'contents'}[10]{'contents'}[0]{'parent'} = $result_trees{'unknown_command_with_braces'}{'contents'}[10];
  123. $result_trees{'unknown_command_with_braces'}{'contents'}[10]{'parent'} = $result_trees{'unknown_command_with_braces'};
  124. $result_texis{'unknown_command_with_braces'} = 'Unknown thing
  125. Unknown macro first paragraph
  126. second paragraph
  127. first paragraph
  128. second paragraph
  129. third
  130. ';
  131. $result_texts{'unknown_command_with_braces'} = 'Unknown thing
  132. Unknown macro first paragraph
  133. second paragraph
  134. first paragraph
  135. second paragraph
  136. third
  137. ';
  138. $result_errors{'unknown_command_with_braces'} = [
  139. {
  140. 'error_line' => ':1: unknown command `thing\'
  141. ',
  142. 'file_name' => '',
  143. 'line_nr' => 1,
  144. 'macro' => '',
  145. 'text' => 'unknown command `thing\'',
  146. 'type' => 'error'
  147. },
  148. {
  149. 'error_line' => ':1: misplaced {
  150. ',
  151. 'file_name' => '',
  152. 'line_nr' => 1,
  153. 'macro' => '',
  154. 'text' => 'misplaced {',
  155. 'type' => 'error'
  156. },
  157. {
  158. 'error_line' => ':1: misplaced }
  159. ',
  160. 'file_name' => '',
  161. 'line_nr' => 1,
  162. 'macro' => '',
  163. 'text' => 'misplaced }',
  164. 'type' => 'error'
  165. },
  166. {
  167. 'error_line' => ':3: unknown command `unknown\'
  168. ',
  169. 'file_name' => '',
  170. 'line_nr' => 3,
  171. 'macro' => '',
  172. 'text' => 'unknown command `unknown\'',
  173. 'type' => 'error'
  174. },
  175. {
  176. 'error_line' => ':3: misplaced {
  177. ',
  178. 'file_name' => '',
  179. 'line_nr' => 3,
  180. 'macro' => '',
  181. 'text' => 'misplaced {',
  182. 'type' => 'error'
  183. },
  184. {
  185. 'error_line' => ':5: misplaced }
  186. ',
  187. 'file_name' => '',
  188. 'line_nr' => 5,
  189. 'macro' => '',
  190. 'text' => 'misplaced }',
  191. 'type' => 'error'
  192. },
  193. {
  194. 'error_line' => ':7: unknown command `unknown2\'
  195. ',
  196. 'file_name' => '',
  197. 'line_nr' => 7,
  198. 'macro' => '',
  199. 'text' => 'unknown command `unknown2\'',
  200. 'type' => 'error'
  201. },
  202. {
  203. 'error_line' => ':7: misplaced {
  204. ',
  205. 'file_name' => '',
  206. 'line_nr' => 7,
  207. 'macro' => '',
  208. 'text' => 'misplaced {',
  209. 'type' => 'error'
  210. },
  211. {
  212. 'error_line' => ':11: misplaced }
  213. ',
  214. 'file_name' => '',
  215. 'line_nr' => 11,
  216. 'macro' => '',
  217. 'text' => 'misplaced }',
  218. 'type' => 'error'
  219. }
  220. ];
  221. 1;