makiri 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (641) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +18 -7
  3. data/CHANGELOG.md +148 -5
  4. data/README.md +173 -7
  5. data/Rakefile +103 -7
  6. data/ext/makiri/bridge/bridge.h +28 -0
  7. data/ext/makiri/bridge/ruby_string.c +217 -0
  8. data/ext/makiri/core/mkr_alloc.h +1 -1
  9. data/ext/makiri/core/mkr_buf.c +35 -1
  10. data/ext/makiri/core/mkr_buf.h +37 -3
  11. data/ext/makiri/core/mkr_core.h +1 -1
  12. data/ext/makiri/core/mkr_hash.h +1 -1
  13. data/ext/makiri/core/mkr_text.h +8 -8
  14. data/ext/makiri/extconf.rb +20 -2
  15. data/ext/makiri/glue/glue.h +53 -11
  16. data/ext/makiri/glue/ruby_doc.c +165 -35
  17. data/ext/makiri/glue/ruby_html_css.c +246 -0
  18. data/ext/makiri/glue/{ruby_mutate.c → ruby_html_mutate.c} +271 -43
  19. data/ext/makiri/glue/ruby_html_node.c +888 -0
  20. data/ext/makiri/glue/ruby_html_serialize.c +154 -0
  21. data/ext/makiri/glue/ruby_node.c +54 -555
  22. data/ext/makiri/glue/ruby_node_set.c +167 -32
  23. data/ext/makiri/glue/ruby_xml.c +420 -0
  24. data/ext/makiri/glue/ruby_xml_node.c +1386 -0
  25. data/ext/makiri/glue/ruby_xpath.c +60 -27
  26. data/ext/makiri/glue/ruby_xpath.h +19 -0
  27. data/ext/makiri/lexbor_compat/compat.h +42 -9
  28. data/ext/makiri/lexbor_compat/compat_internal.h +1 -1
  29. data/ext/makiri/lexbor_compat/dom_index.c +2 -2
  30. data/ext/makiri/lexbor_compat/post_parse.c +100 -10
  31. data/ext/makiri/lexbor_compat/source_loc.c +13 -9
  32. data/ext/makiri/lexbor_compat/text_index.c +14 -8
  33. data/ext/makiri/lexbor_compat/utf8_input.c +85 -26
  34. data/ext/makiri/makiri.c +139 -6
  35. data/ext/makiri/makiri.h +43 -2
  36. data/ext/makiri/xml/mkr_xml.h +126 -0
  37. data/ext/makiri/xml/mkr_xml_chars.c +225 -0
  38. data/ext/makiri/xml/mkr_xml_mutate.c +875 -0
  39. data/ext/makiri/xml/mkr_xml_mutate.h +139 -0
  40. data/ext/makiri/xml/mkr_xml_node.c +267 -0
  41. data/ext/makiri/xml/mkr_xml_node.h +119 -0
  42. data/ext/makiri/xml/mkr_xml_tree.c +1479 -0
  43. data/ext/makiri/xpath/mkr_xpath.c +59 -32
  44. data/ext/makiri/xpath/mkr_xpath.h +96 -4
  45. data/ext/makiri/xpath/mkr_xpath_engine_html.c +17 -0
  46. data/ext/makiri/xpath/mkr_xpath_engine_xml.c +12 -0
  47. data/ext/makiri/xpath/{mkr_xpath_eval.c → mkr_xpath_eval_body.h} +202 -175
  48. data/ext/makiri/xpath/{mkr_xpath_funcs.c → mkr_xpath_funcs_body.h} +110 -86
  49. data/ext/makiri/xpath/mkr_xpath_internal.h +91 -200
  50. data/ext/makiri/xpath/mkr_xpath_lex.c +2 -2
  51. data/ext/makiri/xpath/mkr_xpath_node_access_html.h +138 -0
  52. data/ext/makiri/xpath/mkr_xpath_node_access_xml.h +142 -0
  53. data/ext/makiri/xpath/mkr_xpath_parse.c +5 -5
  54. data/ext/makiri/xpath/mkr_xpath_prelude_html.h +30 -0
  55. data/ext/makiri/xpath/mkr_xpath_prelude_xml.h +28 -0
  56. data/ext/makiri/xpath/mkr_xpath_shared.c +593 -0
  57. data/ext/makiri/xpath/{mkr_xpath_value.c → mkr_xpath_value_body.h} +145 -656
  58. data/ext/makiri/xpath/mkr_xpath_xml_selftest.c +76 -0
  59. data/lib/makiri/{attribute.rb → attr.rb} +7 -3
  60. data/lib/makiri/cdata_section.rb +21 -0
  61. data/lib/makiri/comment.rb +12 -0
  62. data/lib/makiri/compat_aliases.rb +30 -0
  63. data/lib/makiri/document.rb +4 -76
  64. data/lib/makiri/document_fragment.rb +14 -9
  65. data/lib/makiri/element.rb +5 -3
  66. data/lib/makiri/html/document.rb +106 -0
  67. data/lib/makiri/html/node_methods.rb +19 -0
  68. data/lib/makiri/html.rb +12 -0
  69. data/lib/makiri/node.rb +58 -15
  70. data/lib/makiri/node_set.rb +8 -0
  71. data/lib/makiri/processing_instruction.rb +12 -0
  72. data/lib/makiri/text.rb +2 -0
  73. data/lib/makiri/version.rb +1 -1
  74. data/lib/makiri/xml/document.rb +24 -0
  75. data/lib/makiri/xml/node_methods.rb +37 -0
  76. data/lib/makiri/xml.rb +10 -0
  77. data/lib/makiri/xpath_context.rb +1 -1
  78. data/lib/makiri.rb +23 -5
  79. data/script/build_native_gem.rb +2 -2
  80. data/script/check_c_safety.rb +32 -0
  81. data/script/check_c_safety_allowlist.yml +83 -0
  82. metadata +35 -565
  83. data/ext/makiri/glue/ruby_css.c +0 -185
  84. data/ext/makiri/glue/ruby_serialize.c +0 -92
  85. data/lib/makiri/cdata.rb +0 -6
  86. data/vendor/lexbor/.github/FUNDING.yml +0 -12
  87. data/vendor/lexbor/.github/workflows/cmake.yml +0 -37
  88. data/vendor/lexbor/benchmarks/CMakeLists.txt +0 -22
  89. data/vendor/lexbor/benchmarks/benchmark.h +0 -101
  90. data/vendor/lexbor/benchmarks/lexbor/html/CMakeLists.txt +0 -16
  91. data/vendor/lexbor/benchmarks/lexbor/html/tokenizer/input_validation.c +0 -100
  92. data/vendor/lexbor/benchmarks/lexbor/html/tokenizer/parse.c +0 -95
  93. data/vendor/lexbor/benchmarks/lexbor/selectors/CMakeLists.txt +0 -16
  94. data/vendor/lexbor/benchmarks/lexbor/selectors/files/average.html +0 -41
  95. data/vendor/lexbor/benchmarks/lexbor/selectors/selectors.c +0 -144
  96. data/vendor/lexbor/examples/CMakeLists.txt +0 -17
  97. data/vendor/lexbor/examples/lexbor/css/CMakeLists.txt +0 -25
  98. data/vendor/lexbor/examples/lexbor/css/StyleSheet.c +0 -70
  99. data/vendor/lexbor/examples/lexbor/css/base.h +0 -34
  100. data/vendor/lexbor/examples/lexbor/css/selectors/list_easy_way.c +0 -74
  101. data/vendor/lexbor/examples/lexbor/css/selectors/list_fast_way.c +0 -149
  102. data/vendor/lexbor/examples/lexbor/css/syntax/structure_parse_file.c +0 -467
  103. data/vendor/lexbor/examples/lexbor/css/syntax/tokenizer/from_file.c +0 -87
  104. data/vendor/lexbor/examples/lexbor/css/syntax/tokenizer/print_raw.c +0 -100
  105. data/vendor/lexbor/examples/lexbor/encoding/CMakeLists.txt +0 -11
  106. data/vendor/lexbor/examples/lexbor/encoding/buffer/decode/decode.c +0 -58
  107. data/vendor/lexbor/examples/lexbor/encoding/buffer/decode/decoder.c +0 -140
  108. data/vendor/lexbor/examples/lexbor/encoding/buffer/decode/validate.c +0 -65
  109. data/vendor/lexbor/examples/lexbor/encoding/buffer/encode/encode.c +0 -67
  110. data/vendor/lexbor/examples/lexbor/encoding/buffer/encode/encoder.c +0 -262
  111. data/vendor/lexbor/examples/lexbor/encoding/buffer/encode/validate.c +0 -77
  112. data/vendor/lexbor/examples/lexbor/encoding/buffer/from_to.c +0 -193
  113. data/vendor/lexbor/examples/lexbor/encoding/data_by_name.c +0 -23
  114. data/vendor/lexbor/examples/lexbor/encoding/single/decode/decode.c +0 -55
  115. data/vendor/lexbor/examples/lexbor/encoding/single/decode/decoder.c +0 -115
  116. data/vendor/lexbor/examples/lexbor/encoding/single/decode/validate.c +0 -59
  117. data/vendor/lexbor/examples/lexbor/encoding/single/encode/encode.c +0 -65
  118. data/vendor/lexbor/examples/lexbor/encoding/single/encode/encoder.c +0 -241
  119. data/vendor/lexbor/examples/lexbor/encoding/single/encode/validate.c +0 -85
  120. data/vendor/lexbor/examples/lexbor/encoding/single/from_to.c +0 -156
  121. data/vendor/lexbor/examples/lexbor/html/CMakeLists.txt +0 -21
  122. data/vendor/lexbor/examples/lexbor/html/base.h +0 -98
  123. data/vendor/lexbor/examples/lexbor/html/document_parse.c +0 -43
  124. data/vendor/lexbor/examples/lexbor/html/document_parse_chunk.c +0 -72
  125. data/vendor/lexbor/examples/lexbor/html/document_title.c +0 -84
  126. data/vendor/lexbor/examples/lexbor/html/element_attributes.c +0 -134
  127. data/vendor/lexbor/examples/lexbor/html/element_create.c +0 -84
  128. data/vendor/lexbor/examples/lexbor/html/element_innerHTML.c +0 -52
  129. data/vendor/lexbor/examples/lexbor/html/elements_by_attr.c +0 -106
  130. data/vendor/lexbor/examples/lexbor/html/elements_by_class_name.c +0 -55
  131. data/vendor/lexbor/examples/lexbor/html/elements_by_tag_name.c +0 -51
  132. data/vendor/lexbor/examples/lexbor/html/encoding.c +0 -95
  133. data/vendor/lexbor/examples/lexbor/html/html2sexpr.c +0 -231
  134. data/vendor/lexbor/examples/lexbor/html/parse.c +0 -69
  135. data/vendor/lexbor/examples/lexbor/html/parse_chunk.c +0 -77
  136. data/vendor/lexbor/examples/lexbor/html/tokenizer/callback.c +0 -78
  137. data/vendor/lexbor/examples/lexbor/html/tokenizer/simple.c +0 -118
  138. data/vendor/lexbor/examples/lexbor/html/tokenizer/tag_attributes.c +0 -106
  139. data/vendor/lexbor/examples/lexbor/html/tokenizer/text.c +0 -75
  140. data/vendor/lexbor/examples/lexbor/punycode/CMakeLists.txt +0 -11
  141. data/vendor/lexbor/examples/lexbor/punycode/decode.c +0 -102
  142. data/vendor/lexbor/examples/lexbor/punycode/encode.c +0 -102
  143. data/vendor/lexbor/examples/lexbor/selectors/CMakeLists.txt +0 -15
  144. data/vendor/lexbor/examples/lexbor/selectors/easy_way.c +0 -120
  145. data/vendor/lexbor/examples/lexbor/selectors/normal_way.c +0 -172
  146. data/vendor/lexbor/examples/lexbor/selectors/unique_nodes.c +0 -142
  147. data/vendor/lexbor/examples/lexbor/styles/CMakeLists.txt +0 -15
  148. data/vendor/lexbor/examples/lexbor/styles/attribute_style.c +0 -110
  149. data/vendor/lexbor/examples/lexbor/styles/base.h +0 -34
  150. data/vendor/lexbor/examples/lexbor/styles/events_insert.c +0 -199
  151. data/vendor/lexbor/examples/lexbor/styles/stylesheet.c +0 -141
  152. data/vendor/lexbor/examples/lexbor/styles/walk.c +0 -170
  153. data/vendor/lexbor/examples/lexbor/unicode/CMakeLists.txt +0 -17
  154. data/vendor/lexbor/examples/lexbor/unicode/idna_to_ascii.c +0 -115
  155. data/vendor/lexbor/examples/lexbor/unicode/normalization_form.c +0 -99
  156. data/vendor/lexbor/examples/lexbor/unicode/normalization_form_stdin.c +0 -99
  157. data/vendor/lexbor/examples/lexbor/url/CMakeLists.txt +0 -15
  158. data/vendor/lexbor/examples/lexbor/url/parse.c +0 -101
  159. data/vendor/lexbor/examples/lexbor/url/relative.c +0 -112
  160. data/vendor/lexbor/images/SerpApi-logo.png +0 -0
  161. data/vendor/lexbor/images/neural-logo.png +0 -0
  162. data/vendor/lexbor/packaging/Makefile +0 -26
  163. data/vendor/lexbor/packaging/README.md +0 -17
  164. data/vendor/lexbor/packaging/deb/Makefile.in +0 -40
  165. data/vendor/lexbor/packaging/deb/Makefile.module.in +0 -15
  166. data/vendor/lexbor/packaging/deb/debian_in/changelog +0 -6
  167. data/vendor/lexbor/packaging/deb/debian_in/control +0 -25
  168. data/vendor/lexbor/packaging/deb/debian_in/copyright +0 -29
  169. data/vendor/lexbor/packaging/deb/debian_in/dev.dirs +0 -2
  170. data/vendor/lexbor/packaging/deb/debian_in/dev.install +0 -3
  171. data/vendor/lexbor/packaging/deb/debian_in/dirs +0 -1
  172. data/vendor/lexbor/packaging/deb/debian_in/docs +0 -2
  173. data/vendor/lexbor/packaging/deb/debian_in/install +0 -1
  174. data/vendor/lexbor/packaging/deb/debian_in/not-installed +0 -4
  175. data/vendor/lexbor/packaging/deb/debian_in/rules +0 -15
  176. data/vendor/lexbor/packaging/deb/debian_in/source/format +0 -1
  177. data/vendor/lexbor/packaging/deb/debian_main_in/changelog +0 -6
  178. data/vendor/lexbor/packaging/deb/debian_main_in/control +0 -33
  179. data/vendor/lexbor/packaging/deb/debian_main_in/copyright +0 -29
  180. data/vendor/lexbor/packaging/deb/debian_main_in/dev.dirs +0 -3
  181. data/vendor/lexbor/packaging/deb/debian_main_in/dev.install +0 -5
  182. data/vendor/lexbor/packaging/deb/debian_main_in/dirs +0 -1
  183. data/vendor/lexbor/packaging/deb/debian_main_in/docs +0 -2
  184. data/vendor/lexbor/packaging/deb/debian_main_in/install +0 -1
  185. data/vendor/lexbor/packaging/deb/debian_main_in/rules +0 -15
  186. data/vendor/lexbor/packaging/deb/debian_main_in/source/format +0 -1
  187. data/vendor/lexbor/packaging/rpm/Makefile +0 -14
  188. data/vendor/lexbor/packaging/rpm/build.sh +0 -105
  189. data/vendor/lexbor/packaging/rpm/liblexbor-module.spec.in +0 -31
  190. data/vendor/lexbor/packaging/rpm/liblexbor.spec.in +0 -62
  191. data/vendor/lexbor/test/CMakeLists.txt +0 -44
  192. data/vendor/lexbor/test/amalgamation/code/_base.h +0 -33
  193. data/vendor/lexbor/test/amalgamation/code/html.c +0 -35
  194. data/vendor/lexbor/test/amalgamation/generate_and_compile.sh +0 -130
  195. data/vendor/lexbor/test/external/commoncrawl.py +0 -110
  196. data/vendor/lexbor/test/files/lexbor/css/declarations/display.ton +0 -801
  197. data/vendor/lexbor/test/files/lexbor/css/declarations/height.ton +0 -367
  198. data/vendor/lexbor/test/files/lexbor/css/declarations/syntax.ton +0 -189
  199. data/vendor/lexbor/test/files/lexbor/css/declarations/width.ton +0 -367
  200. data/vendor/lexbor/test/files/lexbor/css/lexbor.css +0 -205
  201. data/vendor/lexbor/test/files/lexbor/css/syntax/parser/at.ton +0 -518
  202. data/vendor/lexbor/test/files/lexbor/css/syntax/parser/other.ton +0 -80
  203. data/vendor/lexbor/test/files/lexbor/css/syntax/parser/qualified.ton +0 -799
  204. data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/CDO-CDC.ton +0 -226
  205. data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/at.ton +0 -170
  206. data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/broken-utf-8.ton +0 -101
  207. data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/comment.ton +0 -95
  208. data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/hash.ton +0 -181
  209. data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/ident.ton +0 -245
  210. data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/number.ton +0 -694
  211. data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/other.ton +0 -16
  212. data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/reverse-solidus.ton +0 -111
  213. data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/single-tokens.ton +0 -66
  214. data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/string.ton +0 -303
  215. data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/unicode_range.ton +0 -139
  216. data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/url-function.ton +0 -229
  217. data/vendor/lexbor/test/files/lexbor/css/syntax/tokenizer/whitespace.ton +0 -45
  218. data/vendor/lexbor/test/files/lexbor/encoding/big5_map_decode.txt +0 -14699
  219. data/vendor/lexbor/test/files/lexbor/encoding/euc_jp_map_decode.txt +0 -7737
  220. data/vendor/lexbor/test/files/lexbor/encoding/euc_kr_map_decode.txt +0 -17189
  221. data/vendor/lexbor/test/files/lexbor/encoding/gb18030_map_decode.txt +0 -27672
  222. data/vendor/lexbor/test/files/lexbor/encoding/iso_2022_jp_map_decode.txt +0 -7928
  223. data/vendor/lexbor/test/files/lexbor/encoding/shift_jis_map_decode.txt +0 -5138
  224. data/vendor/lexbor/test/files/lexbor/html/html5_test/README.md +0 -12
  225. data/vendor/lexbor/test/files/lexbor/html/html5_test/adoption01.ton +0 -442
  226. data/vendor/lexbor/test/files/lexbor/html/html5_test/adoption02.ton +0 -53
  227. data/vendor/lexbor/test/files/lexbor/html/html5_test/attributes.ton +0 -29
  228. data/vendor/lexbor/test/files/lexbor/html/html5_test/blocks.ton +0 -891
  229. data/vendor/lexbor/test/files/lexbor/html/html5_test/char_ref.ton +0 -51
  230. data/vendor/lexbor/test/files/lexbor/html/html5_test/comments01.ton +0 -290
  231. data/vendor/lexbor/test/files/lexbor/html/html5_test/doctype01.ton +0 -637
  232. data/vendor/lexbor/test/files/lexbor/html/html5_test/domjs-unsafe.ton +0 -822
  233. data/vendor/lexbor/test/files/lexbor/html/html5_test/entities01.ton +0 -1262
  234. data/vendor/lexbor/test/files/lexbor/html/html5_test/entities02.ton +0 -416
  235. data/vendor/lexbor/test/files/lexbor/html/html5_test/foreign-fragment.ton +0 -859
  236. data/vendor/lexbor/test/files/lexbor/html/html5_test/html5test-com.ton +0 -414
  237. data/vendor/lexbor/test/files/lexbor/html/html5_test/inbody01.ton +0 -78
  238. data/vendor/lexbor/test/files/lexbor/html/html5_test/isindex.ton +0 -67
  239. data/vendor/lexbor/test/files/lexbor/html/html5_test/main-element.ton +0 -63
  240. data/vendor/lexbor/test/files/lexbor/html/html5_test/math.ton +0 -140
  241. data/vendor/lexbor/test/files/lexbor/html/html5_test/menuitem-element.ton +0 -345
  242. data/vendor/lexbor/test/files/lexbor/html/html5_test/namespace-sensitivity.ton +0 -31
  243. data/vendor/lexbor/test/files/lexbor/html/html5_test/noscript01.ton +0 -344
  244. data/vendor/lexbor/test/files/lexbor/html/html5_test/pending-spec-changes-plain-text-unsafe.ton +0 -39
  245. data/vendor/lexbor/test/files/lexbor/html/html5_test/pending-spec-changes.ton +0 -65
  246. data/vendor/lexbor/test/files/lexbor/html/html5_test/plain-text-unsafe.ton +0 -657
  247. data/vendor/lexbor/test/files/lexbor/html/html5_test/quirks01.ton +0 -77
  248. data/vendor/lexbor/test/files/lexbor/html/html5_test/ruby.ton +0 -411
  249. data/vendor/lexbor/test/files/lexbor/html/html5_test/scriptdata01.ton +0 -499
  250. data/vendor/lexbor/test/files/lexbor/html/html5_test/search-element.ton +0 -63
  251. data/vendor/lexbor/test/files/lexbor/html/html5_test/svg.ton +0 -140
  252. data/vendor/lexbor/test/files/lexbor/html/html5_test/tables01.ton +0 -421
  253. data/vendor/lexbor/test/files/lexbor/html/html5_test/template.ton +0 -2199
  254. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests1.ton +0 -2486
  255. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests10.ton +0 -1090
  256. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests11.ton +0 -317
  257. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests12.ton +0 -72
  258. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests14.ton +0 -100
  259. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests15.ton +0 -290
  260. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests16.ton +0 -3471
  261. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests17.ton +0 -244
  262. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests18.ton +0 -752
  263. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests19.ton +0 -1889
  264. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests2.ton +0 -1093
  265. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests20.ton +0 -1158
  266. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests21.ton +0 -416
  267. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests22.ton +0 -192
  268. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests23.ton +0 -148
  269. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests24.ton +0 -107
  270. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests25.ton +0 -390
  271. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests26.ton +0 -546
  272. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests3.ton +0 -407
  273. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests4.ton +0 -96
  274. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests5.ton +0 -299
  275. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests6.ton +0 -908
  276. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests7.ton +0 -597
  277. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests8.ton +0 -219
  278. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests9.ton +0 -585
  279. data/vendor/lexbor/test/files/lexbor/html/html5_test/tests_innerHTML_1.ton +0 -1164
  280. data/vendor/lexbor/test/files/lexbor/html/html5_test/tricky01.ton +0 -378
  281. data/vendor/lexbor/test/files/lexbor/html/html5_test/webkit01.ton +0 -1022
  282. data/vendor/lexbor/test/files/lexbor/html/html5_test/webkit02.ton +0 -996
  283. data/vendor/lexbor/test/files/lexbor/html/html5lib_encoding/README.md +0 -12
  284. data/vendor/lexbor/test/files/lexbor/html/html5lib_encoding/test-yahoo-jp.dat +0 -10
  285. data/vendor/lexbor/test/files/lexbor/html/html5lib_encoding/tests1.dat +0 -388
  286. data/vendor/lexbor/test/files/lexbor/html/html5lib_encoding/tests2.dat +0 -115
  287. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/README.md +0 -12
  288. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/contentModelFlags.test +0 -93
  289. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/domjs.test +0 -335
  290. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/entities.test +0 -542
  291. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/escapeFlag.test +0 -36
  292. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/namedEntities.test +0 -42422
  293. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/numericEntities.test +0 -1677
  294. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/pendingSpecChanges.test +0 -9
  295. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/test1.test +0 -353
  296. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/test2.test +0 -275
  297. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/test3.test +0 -11233
  298. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/test4.test +0 -532
  299. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/unicodeChars.test +0 -1577
  300. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/unicodeCharsProblematic.test +0 -41
  301. data/vendor/lexbor/test/files/lexbor/html/html5lib_tokenizer/xmlViolation.test +0 -20
  302. data/vendor/lexbor/test/files/lexbor/html/lexbor.html +0 -150
  303. data/vendor/lexbor/test/files/lexbor/html/serialize_ext/attributes.ton +0 -167
  304. data/vendor/lexbor/test/files/lexbor/html/serialize_ext/comment.ton +0 -218
  305. data/vendor/lexbor/test/files/lexbor/html/serialize_ext/document_type.ton +0 -180
  306. data/vendor/lexbor/test/files/lexbor/html/serialize_ext/element.ton +0 -392
  307. data/vendor/lexbor/test/files/lexbor/html/serialize_ext/processing_instruction.ton +0 -45
  308. data/vendor/lexbor/test/files/lexbor/html/serialize_ext/serialize_ext.ton +0 -277
  309. data/vendor/lexbor/test/files/lexbor/html/serialize_ext/text.ton +0 -308
  310. data/vendor/lexbor/test/files/lexbor/html/tokenizer/char_ref.ton +0 -563
  311. data/vendor/lexbor/test/files/lexbor/html/tokenizer/comment.ton +0 -28
  312. data/vendor/lexbor/test/files/lexbor/html/tokenizer/doctype.ton +0 -257
  313. data/vendor/lexbor/test/files/lexbor/html/tokenizer/tag_attr.ton +0 -107
  314. data/vendor/lexbor/test/files/lexbor/html/tokenizer/tag_name.ton +0 -51
  315. data/vendor/lexbor/test/files/lexbor/url/changes.ton +0 -1005
  316. data/vendor/lexbor/test/files/lexbor/url/domain.ton +0 -93
  317. data/vendor/lexbor/test/files/lexbor/url/file.ton +0 -29
  318. data/vendor/lexbor/test/files/lexbor/url/fragment.ton +0 -47
  319. data/vendor/lexbor/test/files/lexbor/url/ipv4.ton +0 -221
  320. data/vendor/lexbor/test/files/lexbor/url/ipv6.ton +0 -197
  321. data/vendor/lexbor/test/files/lexbor/url/path.ton +0 -510
  322. data/vendor/lexbor/test/files/lexbor/url/query.ton +0 -135
  323. data/vendor/lexbor/test/files/lexbor/url/scheme.ton +0 -139
  324. data/vendor/lexbor/test/files/lexbor/url/slow_path.ton +0 -460
  325. data/vendor/lexbor/test/files/lexbor/url/url.ton +0 -78
  326. data/vendor/lexbor/test/files/lexbor/url/username_password.ton +0 -127
  327. data/vendor/lexbor/test/fuzzers/lexbor/css/CMakeLists.txt +0 -16
  328. data/vendor/lexbor/test/fuzzers/lexbor/css/css.dict +0 -307
  329. data/vendor/lexbor/test/fuzzers/lexbor/css/stylesheet.c +0 -55
  330. data/vendor/lexbor/test/fuzzers/lexbor/css/syntax/syntax.dict +0 -41
  331. data/vendor/lexbor/test/fuzzers/lexbor/css/syntax/tokenizer.c +0 -99
  332. data/vendor/lexbor/test/fuzzers/lexbor/encoding/CMakeLists.txt +0 -16
  333. data/vendor/lexbor/test/fuzzers/lexbor/encoding/decode.c +0 -29
  334. data/vendor/lexbor/test/fuzzers/lexbor/html/CMakeLists.txt +0 -16
  335. data/vendor/lexbor/test/fuzzers/lexbor/html/document_parse.c +0 -23
  336. data/vendor/lexbor/test/fuzzers/lexbor/punycode/CMakeLists.txt +0 -16
  337. data/vendor/lexbor/test/fuzzers/lexbor/punycode/base.c +0 -89
  338. data/vendor/lexbor/test/fuzzers/lexbor/selectors/CMakeLists.txt +0 -16
  339. data/vendor/lexbor/test/fuzzers/lexbor/selectors/find.c +0 -146
  340. data/vendor/lexbor/test/fuzzers/lexbor/selectors/selectors.dict +0 -71
  341. data/vendor/lexbor/test/fuzzers/lexbor/unicode/CMakeLists.txt +0 -16
  342. data/vendor/lexbor/test/fuzzers/lexbor/unicode/idna_to_ascii.c +0 -40
  343. data/vendor/lexbor/test/fuzzers/lexbor/unicode/normalization_forms.c +0 -41
  344. data/vendor/lexbor/test/fuzzers/lexbor/url/CMakeLists.txt +0 -16
  345. data/vendor/lexbor/test/fuzzers/lexbor/url/modify.c +0 -117
  346. data/vendor/lexbor/test/fuzzers/lexbor/url/parser.c +0 -132
  347. data/vendor/lexbor/test/fuzzers/lexbor/url/url.dict +0 -13
  348. data/vendor/lexbor/test/lexbor/core/CMakeLists.txt +0 -17
  349. data/vendor/lexbor/test/lexbor/core/array.c +0 -443
  350. data/vendor/lexbor/test/lexbor/core/array_obj.c +0 -306
  351. data/vendor/lexbor/test/lexbor/core/avl.c +0 -1588
  352. data/vendor/lexbor/test/lexbor/core/bst.c +0 -388
  353. data/vendor/lexbor/test/lexbor/core/bst_map.c +0 -209
  354. data/vendor/lexbor/test/lexbor/core/dobject.c +0 -322
  355. data/vendor/lexbor/test/lexbor/core/hash.c +0 -171
  356. data/vendor/lexbor/test/lexbor/core/in.c +0 -356
  357. data/vendor/lexbor/test/lexbor/core/mem.c +0 -332
  358. data/vendor/lexbor/test/lexbor/core/mraw.c +0 -612
  359. data/vendor/lexbor/test/lexbor/core/str.c +0 -433
  360. data/vendor/lexbor/test/lexbor/css/CMakeLists.txt +0 -25
  361. data/vendor/lexbor/test/lexbor/css/declarations.c +0 -571
  362. data/vendor/lexbor/test/lexbor/css/selectors/selectors.c +0 -894
  363. data/vendor/lexbor/test/lexbor/css/selectors/specificity.c +0 -177
  364. data/vendor/lexbor/test/lexbor/css/stylesheet.c +0 -196
  365. data/vendor/lexbor/test/lexbor/css/syntax/an_plus_b.c +0 -233
  366. data/vendor/lexbor/test/lexbor/css/syntax/parser.c +0 -1134
  367. data/vendor/lexbor/test/lexbor/css/syntax/style.c +0 -67
  368. data/vendor/lexbor/test/lexbor/css/syntax/tokenizer.c +0 -485
  369. data/vendor/lexbor/test/lexbor/css/syntax/tokenizer_queue.c +0 -92
  370. data/vendor/lexbor/test/lexbor/dom/CMakeLists.txt +0 -17
  371. data/vendor/lexbor/test/lexbor/dom/exception.c +0 -210
  372. data/vendor/lexbor/test/lexbor/dom/node.c +0 -441
  373. data/vendor/lexbor/test/lexbor/encoding/CMakeLists.txt +0 -42
  374. data/vendor/lexbor/test/lexbor/encoding/buffer/big5.c +0 -210
  375. data/vendor/lexbor/test/lexbor/encoding/buffer/encoding.h +0 -243
  376. data/vendor/lexbor/test/lexbor/encoding/buffer/euc_jp.c +0 -228
  377. data/vendor/lexbor/test/lexbor/encoding/buffer/euc_kr.c +0 -172
  378. data/vendor/lexbor/test/lexbor/encoding/buffer/gb18030.c +0 -297
  379. data/vendor/lexbor/test/lexbor/encoding/buffer/ibm866.c +0 -123
  380. data/vendor/lexbor/test/lexbor/encoding/buffer/iso_2022_jp.c +0 -403
  381. data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_10.c +0 -123
  382. data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_13.c +0 -123
  383. data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_14.c +0 -123
  384. data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_15.c +0 -123
  385. data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_16.c +0 -123
  386. data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_2.c +0 -123
  387. data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_3.c +0 -123
  388. data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_4.c +0 -123
  389. data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_5.c +0 -123
  390. data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_6.c +0 -123
  391. data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_7.c +0 -123
  392. data/vendor/lexbor/test/lexbor/encoding/buffer/iso_8859_8.c +0 -123
  393. data/vendor/lexbor/test/lexbor/encoding/buffer/koi8_r.c +0 -123
  394. data/vendor/lexbor/test/lexbor/encoding/buffer/koi8_u.c +0 -123
  395. data/vendor/lexbor/test/lexbor/encoding/buffer/macintosh.c +0 -123
  396. data/vendor/lexbor/test/lexbor/encoding/buffer/shift_jis.c +0 -230
  397. data/vendor/lexbor/test/lexbor/encoding/buffer/utf-16.c +0 -230
  398. data/vendor/lexbor/test/lexbor/encoding/buffer/utf-8.c +0 -282
  399. data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1250.c +0 -123
  400. data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1251.c +0 -123
  401. data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1252.c +0 -123
  402. data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1253.c +0 -123
  403. data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1254.c +0 -123
  404. data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1255.c +0 -123
  405. data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1256.c +0 -123
  406. data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1257.c +0 -123
  407. data/vendor/lexbor/test/lexbor/encoding/buffer/windows_1258.c +0 -123
  408. data/vendor/lexbor/test/lexbor/encoding/buffer/windows_874.c +0 -123
  409. data/vendor/lexbor/test/lexbor/encoding/buffer/x_mac_cyrillic.c +0 -123
  410. data/vendor/lexbor/test/lexbor/encoding/encoding.c +0 -97
  411. data/vendor/lexbor/test/lexbor/encoding/parser.h +0 -225
  412. data/vendor/lexbor/test/lexbor/encoding/single/big5.c +0 -203
  413. data/vendor/lexbor/test/lexbor/encoding/single/encoding.h +0 -227
  414. data/vendor/lexbor/test/lexbor/encoding/single/euc_jp.c +0 -220
  415. data/vendor/lexbor/test/lexbor/encoding/single/euc_kr.c +0 -162
  416. data/vendor/lexbor/test/lexbor/encoding/single/gb18030.c +0 -277
  417. data/vendor/lexbor/test/lexbor/encoding/single/ibm866.c +0 -114
  418. data/vendor/lexbor/test/lexbor/encoding/single/iso_2022_jp.c +0 -342
  419. data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_10.c +0 -114
  420. data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_13.c +0 -114
  421. data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_14.c +0 -114
  422. data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_15.c +0 -114
  423. data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_16.c +0 -114
  424. data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_2.c +0 -114
  425. data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_3.c +0 -114
  426. data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_4.c +0 -114
  427. data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_5.c +0 -114
  428. data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_6.c +0 -114
  429. data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_7.c +0 -114
  430. data/vendor/lexbor/test/lexbor/encoding/single/iso_8859_8.c +0 -114
  431. data/vendor/lexbor/test/lexbor/encoding/single/koi8_r.c +0 -114
  432. data/vendor/lexbor/test/lexbor/encoding/single/koi8_u.c +0 -114
  433. data/vendor/lexbor/test/lexbor/encoding/single/macintosh.c +0 -114
  434. data/vendor/lexbor/test/lexbor/encoding/single/shift_jis.c +0 -203
  435. data/vendor/lexbor/test/lexbor/encoding/single/utf-16.c +0 -216
  436. data/vendor/lexbor/test/lexbor/encoding/single/utf-8.c +0 -227
  437. data/vendor/lexbor/test/lexbor/encoding/single/windows_1250.c +0 -114
  438. data/vendor/lexbor/test/lexbor/encoding/single/windows_1251.c +0 -114
  439. data/vendor/lexbor/test/lexbor/encoding/single/windows_1252.c +0 -114
  440. data/vendor/lexbor/test/lexbor/encoding/single/windows_1253.c +0 -114
  441. data/vendor/lexbor/test/lexbor/encoding/single/windows_1254.c +0 -114
  442. data/vendor/lexbor/test/lexbor/encoding/single/windows_1255.c +0 -114
  443. data/vendor/lexbor/test/lexbor/encoding/single/windows_1256.c +0 -114
  444. data/vendor/lexbor/test/lexbor/encoding/single/windows_1257.c +0 -114
  445. data/vendor/lexbor/test/lexbor/encoding/single/windows_1258.c +0 -114
  446. data/vendor/lexbor/test/lexbor/encoding/single/windows_874.c +0 -114
  447. data/vendor/lexbor/test/lexbor/encoding/single/x_mac_cyrillic.c +0 -114
  448. data/vendor/lexbor/test/lexbor/html/CMakeLists.txt +0 -35
  449. data/vendor/lexbor/test/lexbor/html/attributes.c +0 -105
  450. data/vendor/lexbor/test/lexbor/html/build-cpp.cpp +0 -68
  451. data/vendor/lexbor/test/lexbor/html/clone.c +0 -356
  452. data/vendor/lexbor/test/lexbor/html/dom/document_type.c +0 -125
  453. data/vendor/lexbor/test/lexbor/html/element_by.c +0 -147
  454. data/vendor/lexbor/test/lexbor/html/encoding.c +0 -228
  455. data/vendor/lexbor/test/lexbor/html/encoding_html5lib_tests.c +0 -308
  456. data/vendor/lexbor/test/lexbor/html/encoding_prescan.c +0 -1686
  457. data/vendor/lexbor/test/lexbor/html/inner.c +0 -103
  458. data/vendor/lexbor/test/lexbor/html/other.c +0 -139
  459. data/vendor/lexbor/test/lexbor/html/parse.c +0 -380
  460. data/vendor/lexbor/test/lexbor/html/perf.c +0 -161
  461. data/vendor/lexbor/test/lexbor/html/serialize.c +0 -56
  462. data/vendor/lexbor/test/lexbor/html/serialize_ext.c +0 -461
  463. data/vendor/lexbor/test/lexbor/html/tags.c +0 -140
  464. data/vendor/lexbor/test/lexbor/html/tokenizer/errors.c +0 -34
  465. data/vendor/lexbor/test/lexbor/html/tokenizer/html5lib_tests.c +0 -1168
  466. data/vendor/lexbor/test/lexbor/html/tokenizer_helper.h +0 -403
  467. data/vendor/lexbor/test/lexbor/html/tokenizer_tokens.c +0 -754
  468. data/vendor/lexbor/test/lexbor/html/tree/errors.c +0 -34
  469. data/vendor/lexbor/test/lexbor/html/tree/open_elements.c +0 -99
  470. data/vendor/lexbor/test/lexbor/html/tree_builder.c +0 -536
  471. data/vendor/lexbor/test/lexbor/ns/CMakeLists.txt +0 -17
  472. data/vendor/lexbor/test/lexbor/ns/res.c +0 -55
  473. data/vendor/lexbor/test/lexbor/punycode/CMakeLists.txt +0 -17
  474. data/vendor/lexbor/test/lexbor/punycode/base.c +0 -240
  475. data/vendor/lexbor/test/lexbor/selectors/CMakeLists.txt +0 -17
  476. data/vendor/lexbor/test/lexbor/selectors/selectors.c +0 -911
  477. data/vendor/lexbor/test/lexbor/style/CMakeLists.txt +0 -17
  478. data/vendor/lexbor/test/lexbor/style/element_events.c +0 -291
  479. data/vendor/lexbor/test/lexbor/style/element_style_steps.c +0 -5035
  480. data/vendor/lexbor/test/lexbor/style/not_html_namespace.c +0 -87
  481. data/vendor/lexbor/test/lexbor/style/style_tag.c +0 -184
  482. data/vendor/lexbor/test/lexbor/style/stylesheet.c +0 -51
  483. data/vendor/lexbor/test/lexbor/style/wo_events.c +0 -351
  484. data/vendor/lexbor/test/lexbor/tag/CMakeLists.txt +0 -17
  485. data/vendor/lexbor/test/lexbor/tag/res.c +0 -440
  486. data/vendor/lexbor/test/lexbor/unicode/CMakeLists.txt +0 -17
  487. data/vendor/lexbor/test/lexbor/unicode/composition_test.c +0 -1095
  488. data/vendor/lexbor/test/lexbor/unicode/edges_normalization_forms.c +0 -220
  489. data/vendor/lexbor/test/lexbor/unicode/idna.c +0 -98
  490. data/vendor/lexbor/test/lexbor/unicode/idna_codepoints.c +0 -110
  491. data/vendor/lexbor/test/lexbor/unicode/idna_type.c +0 -31
  492. data/vendor/lexbor/test/lexbor/unicode/normalization_forms.c +0 -205
  493. data/vendor/lexbor/test/lexbor/unicode/normalization_forms_code_points.c +0 -214
  494. data/vendor/lexbor/test/lexbor/unicode/unicode_idna_test_res.h +0 -6423
  495. data/vendor/lexbor/test/lexbor/unicode/unicode_normalization_test_res.h +0 -120229
  496. data/vendor/lexbor/test/lexbor/url/CMakeLists.txt +0 -22
  497. data/vendor/lexbor/test/lexbor/url/errors.c +0 -41
  498. data/vendor/lexbor/test/lexbor/url/other.c +0 -134
  499. data/vendor/lexbor/test/lexbor/url/parser.c +0 -872
  500. data/vendor/lexbor/test/lexbor/url/search_params.c +0 -616
  501. data/vendor/lexbor/test/lexbor/url/validation.c +0 -185
  502. data/vendor/lexbor/test/unit/CMakeLists.txt +0 -49
  503. data/vendor/lexbor/test/unit/kv.c +0 -538
  504. data/vendor/lexbor/test/unit/kv.h +0 -301
  505. data/vendor/lexbor/test/unit/kv_rules.c +0 -609
  506. data/vendor/lexbor/test/unit/kv_state.c +0 -1470
  507. data/vendor/lexbor/test/unit/test.c +0 -131
  508. data/vendor/lexbor/test/unit/test.h +0 -410
  509. data/vendor/lexbor/utils/CMakeLists.txt +0 -11
  510. data/vendor/lexbor/utils/lexbor/css/grammar.txt +0 -263
  511. data/vendor/lexbor/utils/lexbor/css/names.py +0 -768
  512. data/vendor/lexbor/utils/lexbor/css/selectors/pseudo.py +0 -234
  513. data/vendor/lexbor/utils/lexbor/css/selectors/tmp/const.h +0 -21
  514. data/vendor/lexbor/utils/lexbor/css/selectors/tmp/res.h +0 -26
  515. data/vendor/lexbor/utils/lexbor/css/syntax/definitions.py +0 -62
  516. data/vendor/lexbor/utils/lexbor/css/syntax/non_ascii.pl +0 -77
  517. data/vendor/lexbor/utils/lexbor/css/syntax/token_res.py +0 -55
  518. data/vendor/lexbor/utils/lexbor/css/syntax/tokenizer_code_map.py +0 -36
  519. data/vendor/lexbor/utils/lexbor/css/tmp/const.h +0 -24
  520. data/vendor/lexbor/utils/lexbor/css/tmp/res.h +0 -26
  521. data/vendor/lexbor/utils/lexbor/css/tmp/types.h +0 -21
  522. data/vendor/lexbor/utils/lexbor/css/tmp/value_const.h +0 -21
  523. data/vendor/lexbor/utils/lexbor/css/tmp/value_res.h +0 -25
  524. data/vendor/lexbor/utils/lexbor/dom/attr.py +0 -129
  525. data/vendor/lexbor/utils/lexbor/dom/tmp/const.h +0 -23
  526. data/vendor/lexbor/utils/lexbor/dom/tmp/res.h +0 -27
  527. data/vendor/lexbor/utils/lexbor/encoding/CMakeLists.txt +0 -32
  528. data/vendor/lexbor/utils/lexbor/encoding/big5_map_decode.c +0 -93
  529. data/vendor/lexbor/utils/lexbor/encoding/buffer-single-byte.py +0 -95
  530. data/vendor/lexbor/utils/lexbor/encoding/encodings.json +0 -456
  531. data/vendor/lexbor/utils/lexbor/encoding/euc_jp_map_decode.c +0 -83
  532. data/vendor/lexbor/utils/lexbor/encoding/euc_kr_map_decode.c +0 -89
  533. data/vendor/lexbor/utils/lexbor/encoding/gb18030_map_decode.c +0 -170
  534. data/vendor/lexbor/utils/lexbor/encoding/iso_2022_jp_map_decode.c +0 -120
  535. data/vendor/lexbor/utils/lexbor/encoding/multi-byte/index-big5.txt +0 -18596
  536. data/vendor/lexbor/utils/lexbor/encoding/multi-byte/index-euc-kr.txt +0 -17054
  537. data/vendor/lexbor/utils/lexbor/encoding/multi-byte/index-gb18030.txt +0 -23946
  538. data/vendor/lexbor/utils/lexbor/encoding/multi-byte/index-iso-2022-jp-katakana.txt +0 -69
  539. data/vendor/lexbor/utils/lexbor/encoding/multi-byte/index-jis0208.txt +0 -7730
  540. data/vendor/lexbor/utils/lexbor/encoding/multi-byte/index-jis0212.txt +0 -6073
  541. data/vendor/lexbor/utils/lexbor/encoding/multi-byte.pl +0 -424
  542. data/vendor/lexbor/utils/lexbor/encoding/range-byte.py +0 -118
  543. data/vendor/lexbor/utils/lexbor/encoding/ranges/index-gb18030-ranges.txt +0 -213
  544. data/vendor/lexbor/utils/lexbor/encoding/res.py +0 -231
  545. data/vendor/lexbor/utils/lexbor/encoding/shift_jis_map_decode.c +0 -102
  546. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-ibm866.txt +0 -134
  547. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-10.txt +0 -134
  548. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-13.txt +0 -134
  549. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-14.txt +0 -134
  550. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-15.txt +0 -134
  551. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-16.txt +0 -134
  552. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-2.txt +0 -134
  553. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-3.txt +0 -127
  554. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-4.txt +0 -134
  555. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-5.txt +0 -134
  556. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-6.txt +0 -89
  557. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-7.txt +0 -131
  558. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-iso-8859-8.txt +0 -98
  559. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-koi8-r.txt +0 -134
  560. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-koi8-u.txt +0 -134
  561. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-macintosh.txt +0 -134
  562. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1250.txt +0 -134
  563. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1251.txt +0 -134
  564. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1252.txt +0 -134
  565. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1253.txt +0 -131
  566. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1254.txt +0 -134
  567. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1255.txt +0 -124
  568. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1256.txt +0 -134
  569. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1257.txt +0 -132
  570. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-1258.txt +0 -134
  571. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-windows-874.txt +0 -126
  572. data/vendor/lexbor/utils/lexbor/encoding/single-byte/index-x-mac-cyrillic.txt +0 -134
  573. data/vendor/lexbor/utils/lexbor/encoding/single-byte.py +0 -179
  574. data/vendor/lexbor/utils/lexbor/encoding/tmp/buffer_single_byte_test.c +0 -123
  575. data/vendor/lexbor/utils/lexbor/encoding/tmp/const.h +0 -19
  576. data/vendor/lexbor/utils/lexbor/encoding/tmp/multi.c +0 -20
  577. data/vendor/lexbor/utils/lexbor/encoding/tmp/multi.h +0 -37
  578. data/vendor/lexbor/utils/lexbor/encoding/tmp/range.c +0 -17
  579. data/vendor/lexbor/utils/lexbor/encoding/tmp/range.h +0 -35
  580. data/vendor/lexbor/utils/lexbor/encoding/tmp/res.c +0 -22
  581. data/vendor/lexbor/utils/lexbor/encoding/tmp/res.h +0 -34
  582. data/vendor/lexbor/utils/lexbor/encoding/tmp/single.c +0 -20
  583. data/vendor/lexbor/utils/lexbor/encoding/tmp/single.h +0 -37
  584. data/vendor/lexbor/utils/lexbor/encoding/tmp/single_byte_test.c +0 -114
  585. data/vendor/lexbor/utils/lexbor/grammar/CMakeLists.txt +0 -63
  586. data/vendor/lexbor/utils/lexbor/grammar/base.h +0 -89
  587. data/vendor/lexbor/utils/lexbor/grammar/document.h +0 -34
  588. data/vendor/lexbor/utils/lexbor/grammar/grammar.c +0 -243
  589. data/vendor/lexbor/utils/lexbor/grammar/json.c +0 -368
  590. data/vendor/lexbor/utils/lexbor/grammar/json.h +0 -48
  591. data/vendor/lexbor/utils/lexbor/grammar/node.c +0 -653
  592. data/vendor/lexbor/utils/lexbor/grammar/node.h +0 -120
  593. data/vendor/lexbor/utils/lexbor/grammar/parser.c +0 -724
  594. data/vendor/lexbor/utils/lexbor/grammar/parser.h +0 -75
  595. data/vendor/lexbor/utils/lexbor/grammar/test.c +0 -1762
  596. data/vendor/lexbor/utils/lexbor/grammar/test.h +0 -35
  597. data/vendor/lexbor/utils/lexbor/grammar/token.c +0 -258
  598. data/vendor/lexbor/utils/lexbor/grammar/token.h +0 -91
  599. data/vendor/lexbor/utils/lexbor/grammar/tokenizer.c +0 -706
  600. data/vendor/lexbor/utils/lexbor/grammar/tokenizer.h +0 -73
  601. data/vendor/lexbor/utils/lexbor/html/convert_html5_tests.py +0 -162
  602. data/vendor/lexbor/utils/lexbor/html/data/entities.json +0 -2233
  603. data/vendor/lexbor/utils/lexbor/html/insertion_mode.py +0 -61
  604. data/vendor/lexbor/utils/lexbor/html/reorder_html5_tests_tokenizer_errors.py +0 -137
  605. data/vendor/lexbor/utils/lexbor/html/tmp/insertion_mode.c +0 -53
  606. data/vendor/lexbor/utils/lexbor/html/tmp/insertion_mode.h +0 -18
  607. data/vendor/lexbor/utils/lexbor/html/tmp/tokenizer_res.h +0 -20
  608. data/vendor/lexbor/utils/lexbor/html/tokenizer_entities_bst.py +0 -209
  609. data/vendor/lexbor/utils/lexbor/html/tokenizer_entities_switch.py +0 -162
  610. data/vendor/lexbor/utils/lexbor/html/tokenizer_parse_error.pl +0 -97
  611. data/vendor/lexbor/utils/lexbor/lexbor/LXB.py +0 -498
  612. data/vendor/lexbor/utils/lexbor/lexbor/res.py +0 -130
  613. data/vendor/lexbor/utils/lexbor/tag_ns/data/interfaces.json +0 -98
  614. data/vendor/lexbor/utils/lexbor/tag_ns/data/tags.json +0 -371
  615. data/vendor/lexbor/utils/lexbor/tag_ns/interfaces.py +0 -175
  616. data/vendor/lexbor/utils/lexbor/tag_ns/tags.py +0 -808
  617. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/html_attribute_steps_res.h +0 -21
  618. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/html_element_steps_res.h +0 -21
  619. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/html_interface_res.h +0 -29
  620. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/html_open_elements_res.h +0 -21
  621. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/html_tag_res.h +0 -25
  622. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/interface.c +0 -36
  623. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/interface.h +0 -33
  624. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/ns_const.h +0 -26
  625. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/ns_res.h +0 -29
  626. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/open_elements_res.h +0 -21
  627. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/steps_res.h +0 -23
  628. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/tag_const.h +0 -26
  629. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/tag_res.h +0 -26
  630. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/test/ns_res.c +0 -44
  631. data/vendor/lexbor/utils/lexbor/tag_ns/tmp/test/tag_res.c +0 -45
  632. data/vendor/lexbor/utils/lexbor/unicode/build.pl +0 -1323
  633. data/vendor/lexbor/utils/lexbor/unicode/idna_test.pl +0 -398
  634. data/vendor/lexbor/utils/lexbor/unicode/normalization_test.pl +0 -157
  635. data/vendor/lexbor/utils/wasm/gen_constants.py +0 -186
  636. data/vendor/lexbor/wasm/CMakeLists.txt +0 -18
  637. data/vendor/lexbor/wasm/lexbor/engine/CMakeLists.txt +0 -21
  638. data/vendor/lexbor/wasm/lexbor/engine/index.html +0 -406
  639. data/vendor/lexbor/wasm/lexbor/engine/lexbor.c +0 -1340
  640. data/vendor/lexbor/wasm/lexbor/html/CMakeLists.txt +0 -11
  641. data/vendor/lexbor/wasm/lexbor/html/parse.c +0 -58
@@ -1,443 +0,0 @@
1
- /*
2
- * Copyright (C) 2018 Alexander Borisov
3
- *
4
- * Author: Alexander Borisov <borisov@lexbor.com>
5
- */
6
-
7
- #include <unit/test.h>
8
-
9
- #include <lexbor/core/array.h>
10
-
11
-
12
- TEST_BEGIN(init)
13
- {
14
- lexbor_array_t *array = lexbor_array_create();
15
- lxb_status_t status = lexbor_array_init(array, 32);
16
-
17
- test_eq(status, LXB_STATUS_OK);
18
-
19
- lexbor_array_destroy(array, true);
20
- }
21
- TEST_END
22
-
23
- TEST_BEGIN(init_null)
24
- {
25
- lxb_status_t status = lexbor_array_init(NULL, 32);
26
- test_eq(status, LXB_STATUS_ERROR_OBJECT_IS_NULL);
27
- }
28
- TEST_END
29
-
30
- TEST_BEGIN(init_stack)
31
- {
32
- lexbor_array_t array;
33
- lxb_status_t status = lexbor_array_init(&array, 32);
34
-
35
- test_eq(status, LXB_STATUS_OK);
36
-
37
- lexbor_array_destroy(&array, false);
38
- }
39
- TEST_END
40
-
41
- TEST_BEGIN(clean)
42
- {
43
- lexbor_array_t array;
44
- lexbor_array_init(&array, 32);
45
-
46
- lexbor_array_push(&array, (void *) 1);
47
- test_eq_size(lexbor_array_length(&array), 1UL);
48
-
49
- lexbor_array_clean(&array);
50
- test_eq_size(lexbor_array_length(&array), 0UL);
51
-
52
- lexbor_array_destroy(&array, false);
53
- }
54
- TEST_END
55
-
56
- TEST_BEGIN(push)
57
- {
58
- lexbor_array_t array;
59
- lexbor_array_init(&array, 32);
60
-
61
- test_eq_size(lexbor_array_length(&array), 0UL);
62
-
63
- lexbor_array_push(&array, (void *) 1);
64
-
65
- test_eq_size(lexbor_array_length(&array), 1UL);
66
- test_eq(lexbor_array_get(&array, 0), (void *) 1);
67
-
68
- lexbor_array_destroy(&array, false);
69
- }
70
- TEST_END
71
-
72
- TEST_BEGIN(push_null)
73
- {
74
- lexbor_array_t array;
75
- lexbor_array_init(&array, 32);
76
-
77
- lexbor_array_push(&array, NULL);
78
-
79
- test_eq_size(lexbor_array_length(&array), 1UL);
80
- test_eq(lexbor_array_get(&array, 0), NULL);
81
-
82
- lexbor_array_destroy(&array, false);
83
- }
84
- TEST_END
85
-
86
- TEST_BEGIN(pop)
87
- {
88
- lexbor_array_t array;
89
- lexbor_array_init(&array, 32);
90
-
91
- lexbor_array_push(&array, (void *) 123);
92
-
93
- test_eq(lexbor_array_pop(&array), (void *) 123);
94
- test_eq_size(lexbor_array_length(&array), 0UL);
95
-
96
- lexbor_array_destroy(&array, false);
97
- }
98
- TEST_END
99
-
100
- TEST_BEGIN(pop_if_empty)
101
- {
102
- lexbor_array_t array;
103
- lexbor_array_init(&array, 32);
104
-
105
- test_eq_size(lexbor_array_length(&array), 0UL);
106
- test_eq(lexbor_array_pop(&array), NULL);
107
- test_eq_size(lexbor_array_length(&array), 0UL);
108
-
109
- lexbor_array_destroy(&array, false);
110
- }
111
- TEST_END
112
-
113
- TEST_BEGIN(get)
114
- {
115
- lexbor_array_t array;
116
- lexbor_array_init(&array, 32);
117
-
118
- test_eq(lexbor_array_get(&array, 1), NULL);
119
- test_eq(lexbor_array_get(&array, 0), NULL);
120
-
121
- lexbor_array_push(&array, (void *) 123);
122
-
123
- test_eq(lexbor_array_get(&array, 0), (void *) 123);
124
- test_eq(lexbor_array_get(&array, 1), NULL);
125
- test_eq(lexbor_array_get(&array, 1000), NULL);
126
-
127
- lexbor_array_destroy(&array, false);
128
- }
129
- TEST_END
130
-
131
- TEST_BEGIN(set)
132
- {
133
- lexbor_array_t array;
134
- lexbor_array_init(&array, 32);
135
-
136
- lexbor_array_push(&array, (void *) 123);
137
-
138
- test_eq(lexbor_array_set(&array, 0, (void *) 456), LXB_STATUS_OK);
139
- test_eq(lexbor_array_get(&array, 0), (void *) 456);
140
-
141
- test_eq_size(lexbor_array_length(&array), 1UL);
142
-
143
- lexbor_array_destroy(&array, false);
144
- }
145
- TEST_END
146
-
147
- TEST_BEGIN(set_not_exists)
148
- {
149
- lexbor_array_t array;
150
- lexbor_array_init(&array, 32);
151
-
152
- test_eq(lexbor_array_set(&array, 10, (void *) 123), LXB_STATUS_OK);
153
- test_eq(lexbor_array_get(&array, 10), (void *) 123);
154
-
155
- for (size_t i = 0; i < 10; i++) {
156
- test_eq(lexbor_array_get(&array, i), NULL);
157
- }
158
-
159
- test_eq_size(lexbor_array_length(&array), 11UL);
160
-
161
- lexbor_array_destroy(&array, false);
162
- }
163
- TEST_END
164
-
165
- TEST_BEGIN(insert)
166
- {
167
- lxb_status_t status;
168
- lexbor_array_t array;
169
- lexbor_array_init(&array, 32);
170
-
171
- status = lexbor_array_insert(&array, 0, (void *) 456);
172
- test_eq(status, LXB_STATUS_OK);
173
-
174
- test_eq(lexbor_array_get(&array, 0), (void *) 456);
175
-
176
- test_eq_size(lexbor_array_length(&array), 1UL);
177
- test_eq_size(lexbor_array_size(&array), 32UL);
178
-
179
- lexbor_array_destroy(&array, false);
180
- }
181
- TEST_END
182
-
183
- TEST_BEGIN(insert_end)
184
- {
185
- lxb_status_t status;
186
- lexbor_array_t array;
187
- lexbor_array_init(&array, 32);
188
-
189
- status = lexbor_array_insert(&array, 32, (void *) 457);
190
- test_eq(status, LXB_STATUS_OK);
191
-
192
- test_eq(lexbor_array_get(&array, 32), (void *) 457);
193
-
194
- test_eq_size(lexbor_array_length(&array), 33UL);
195
- test_ne_size(lexbor_array_size(&array), 32UL);
196
-
197
- lexbor_array_destroy(&array, false);
198
- }
199
- TEST_END
200
-
201
- TEST_BEGIN(insert_overflow)
202
- {
203
- lxb_status_t status;
204
- lexbor_array_t array;
205
- lexbor_array_init(&array, 32);
206
-
207
- status = lexbor_array_insert(&array, 33, (void *) 458);
208
- test_eq(status, LXB_STATUS_OK);
209
-
210
- test_eq(lexbor_array_get(&array, 33), (void *) 458);
211
-
212
- test_eq_size(lexbor_array_length(&array), 34UL);
213
- test_ne_size(lexbor_array_size(&array), 32UL);
214
-
215
- lexbor_array_destroy(&array, false);
216
- }
217
- TEST_END
218
-
219
- TEST_BEGIN(insert_to)
220
- {
221
- lxb_status_t status;
222
- lexbor_array_t array;
223
- lexbor_array_init(&array, 32);
224
-
225
- test_eq(lexbor_array_push(&array, (void *) 1), LXB_STATUS_OK);
226
- test_eq(lexbor_array_push(&array, (void *) 2), LXB_STATUS_OK);
227
- test_eq(lexbor_array_push(&array, (void *) 3), LXB_STATUS_OK);
228
- test_eq(lexbor_array_push(&array, (void *) 4), LXB_STATUS_OK);
229
- test_eq(lexbor_array_push(&array, (void *) 5), LXB_STATUS_OK);
230
- test_eq(lexbor_array_push(&array, (void *) 6), LXB_STATUS_OK);
231
- test_eq(lexbor_array_push(&array, (void *) 7), LXB_STATUS_OK);
232
- test_eq(lexbor_array_push(&array, (void *) 8), LXB_STATUS_OK);
233
- test_eq(lexbor_array_push(&array, (void *) 9), LXB_STATUS_OK);
234
-
235
- status = lexbor_array_insert(&array, 4, (void *) 459);
236
- test_eq(status, LXB_STATUS_OK);
237
-
238
- test_eq(lexbor_array_get(&array, 0), (void *) 1);
239
- test_eq(lexbor_array_get(&array, 1), (void *) 2);
240
- test_eq(lexbor_array_get(&array, 2), (void *) 3);
241
- test_eq(lexbor_array_get(&array, 3), (void *) 4);
242
- test_eq(lexbor_array_get(&array, 4), (void *) 459);
243
- test_eq(lexbor_array_get(&array, 5), (void *) 5);
244
- test_eq(lexbor_array_get(&array, 6), (void *) 6);
245
- test_eq(lexbor_array_get(&array, 7), (void *) 7);
246
- test_eq(lexbor_array_get(&array, 8), (void *) 8);
247
- test_eq(lexbor_array_get(&array, 9), (void *) 9);
248
-
249
- test_eq_size(lexbor_array_length(&array), 10UL);
250
-
251
- lexbor_array_destroy(&array, false);
252
- }
253
- TEST_END
254
-
255
- TEST_BEGIN(insert_to_end)
256
- {
257
- lxb_status_t status;
258
- lexbor_array_t array;
259
- lexbor_array_init(&array, 9);
260
-
261
- test_eq(lexbor_array_push(&array, (void *) 1), LXB_STATUS_OK);
262
- test_eq(lexbor_array_push(&array, (void *) 2), LXB_STATUS_OK);
263
- test_eq(lexbor_array_push(&array, (void *) 3), LXB_STATUS_OK);
264
- test_eq(lexbor_array_push(&array, (void *) 4), LXB_STATUS_OK);
265
- test_eq(lexbor_array_push(&array, (void *) 5), LXB_STATUS_OK);
266
- test_eq(lexbor_array_push(&array, (void *) 6), LXB_STATUS_OK);
267
- test_eq(lexbor_array_push(&array, (void *) 7), LXB_STATUS_OK);
268
- test_eq(lexbor_array_push(&array, (void *) 8), LXB_STATUS_OK);
269
- test_eq(lexbor_array_push(&array, (void *) 9), LXB_STATUS_OK);
270
-
271
- test_eq_size(lexbor_array_length(&array), 9UL);
272
- test_eq_size(lexbor_array_size(&array), 9UL);
273
-
274
- status = lexbor_array_insert(&array, 4, (void *) 459);
275
- test_eq(status, LXB_STATUS_OK);
276
-
277
- test_eq(lexbor_array_get(&array, 0), (void *) 1);
278
- test_eq(lexbor_array_get(&array, 1), (void *) 2);
279
- test_eq(lexbor_array_get(&array, 2), (void *) 3);
280
- test_eq(lexbor_array_get(&array, 3), (void *) 4);
281
- test_eq(lexbor_array_get(&array, 4), (void *) 459);
282
- test_eq(lexbor_array_get(&array, 5), (void *) 5);
283
- test_eq(lexbor_array_get(&array, 6), (void *) 6);
284
- test_eq(lexbor_array_get(&array, 7), (void *) 7);
285
- test_eq(lexbor_array_get(&array, 8), (void *) 8);
286
- test_eq(lexbor_array_get(&array, 9), (void *) 9);
287
-
288
- test_eq_size(lexbor_array_length(&array), 10UL);
289
- test_ne_size(lexbor_array_size(&array), 9UL);
290
-
291
- lexbor_array_destroy(&array, false);
292
- }
293
- TEST_END
294
-
295
- TEST_BEGIN(delete)
296
- {
297
- lexbor_array_t array;
298
- lexbor_array_init(&array, 32);
299
-
300
- for (size_t i = 0; i < 10; i++) {
301
- lexbor_array_push(&array, (void *) i);
302
- }
303
-
304
- test_eq_size(lexbor_array_length(&array), 10UL);
305
-
306
- lexbor_array_delete(&array, 10, 100);
307
- test_eq_size(lexbor_array_length(&array), 10UL);
308
-
309
- lexbor_array_delete(&array, 100, 1);
310
- test_eq_size(lexbor_array_length(&array), 10UL);
311
-
312
- lexbor_array_delete(&array, 100, 0);
313
- test_eq_size(lexbor_array_length(&array), 10UL);
314
-
315
- for (size_t i = 0; i < 10; i++) {
316
- test_eq(lexbor_array_get(&array, i), (void *) i);
317
- }
318
-
319
- lexbor_array_delete(&array, 4, 4);
320
- test_eq_size(lexbor_array_length(&array), 6UL);
321
-
322
- lexbor_array_delete(&array, 4, 0);
323
- test_eq_size(lexbor_array_length(&array), 6UL);
324
-
325
- lexbor_array_delete(&array, 0, 0);
326
- test_eq_size(lexbor_array_length(&array), 6UL);
327
-
328
- test_eq(lexbor_array_get(&array, 0), (void *) 0);
329
- test_eq(lexbor_array_get(&array, 1), (void *) 1);
330
- test_eq(lexbor_array_get(&array, 2), (void *) 2);
331
- test_eq(lexbor_array_get(&array, 3), (void *) 3);
332
- test_eq(lexbor_array_get(&array, 4), (void *) 8);
333
- test_eq(lexbor_array_get(&array, 5), (void *) 9);
334
-
335
- lexbor_array_delete(&array, 0, 1);
336
- test_eq_size(lexbor_array_length(&array), 5UL);
337
-
338
- test_eq(lexbor_array_get(&array, 0), (void *) 1);
339
- test_eq(lexbor_array_get(&array, 1), (void *) 2);
340
- test_eq(lexbor_array_get(&array, 2), (void *) 3);
341
- test_eq(lexbor_array_get(&array, 3), (void *) 8);
342
- test_eq(lexbor_array_get(&array, 4), (void *) 9);
343
-
344
- lexbor_array_delete(&array, 1, 1000);
345
- test_eq_size(lexbor_array_length(&array), 1UL);
346
-
347
- test_eq(lexbor_array_get(&array, 0), (void *) 1);
348
-
349
- lexbor_array_destroy(&array, false);
350
- }
351
- TEST_END
352
-
353
- TEST_BEGIN(delete_if_empty)
354
- {
355
- lexbor_array_t array;
356
- lexbor_array_init(&array, 32);
357
-
358
- lexbor_array_delete(&array, 0, 0);
359
- test_eq_size(lexbor_array_length(&array), 0UL);
360
-
361
- lexbor_array_delete(&array, 1, 0);
362
- test_eq_size(lexbor_array_length(&array), 0UL);
363
-
364
- lexbor_array_delete(&array, 1, 1);
365
- test_eq_size(lexbor_array_length(&array), 0UL);
366
-
367
- lexbor_array_delete(&array, 100, 1);
368
- test_eq_size(lexbor_array_length(&array), 0UL);
369
-
370
- lexbor_array_delete(&array, 10, 100);
371
- test_eq_size(lexbor_array_length(&array), 0UL);
372
-
373
- lexbor_array_destroy(&array, false);
374
- }
375
- TEST_END
376
-
377
- TEST_BEGIN(expand)
378
- {
379
- lexbor_array_t array;
380
- lexbor_array_init(&array, 32);
381
-
382
- test_ne(lexbor_array_expand(&array, 128), NULL);
383
- test_eq_size(lexbor_array_size(&array), 128UL);
384
-
385
- lexbor_array_destroy(&array, false);
386
- }
387
- TEST_END
388
-
389
- TEST_BEGIN(destroy)
390
- {
391
- lexbor_array_t *array = lexbor_array_create();
392
- lexbor_array_init(array, 32);
393
-
394
- test_eq(lexbor_array_destroy(array, true), NULL);
395
-
396
- array = lexbor_array_create();
397
- lexbor_array_init(array, 32);
398
-
399
- test_eq(lexbor_array_destroy(array, false), array);
400
- test_eq(lexbor_array_destroy(array, true), NULL);
401
- test_eq(lexbor_array_destroy(NULL, false), NULL);
402
- }
403
- TEST_END
404
-
405
- TEST_BEGIN(destroy_stack)
406
- {
407
- lexbor_array_t array;
408
- lexbor_array_init(&array, 32);
409
-
410
- test_eq(lexbor_array_destroy(&array, false), &array);
411
- }
412
- TEST_END
413
-
414
- int
415
- main(int argc, const char * argv[])
416
- {
417
- TEST_INIT();
418
-
419
- TEST_ADD(init);
420
- TEST_ADD(init_null);
421
- TEST_ADD(init_stack);
422
- TEST_ADD(clean);
423
- TEST_ADD(push);
424
- TEST_ADD(push_null);
425
- TEST_ADD(pop);
426
- TEST_ADD(pop_if_empty);
427
- TEST_ADD(delete);
428
- TEST_ADD(delete_if_empty);
429
- TEST_ADD(set);
430
- TEST_ADD(set_not_exists);
431
- TEST_ADD(insert);
432
- TEST_ADD(insert_end);
433
- TEST_ADD(insert_overflow);
434
- TEST_ADD(insert_to);
435
- TEST_ADD(insert_to_end);
436
- TEST_ADD(expand);
437
- TEST_ADD(destroy);
438
- TEST_ADD(destroy_stack);
439
-
440
- TEST_RUN("lexbor/core/array");
441
- TEST_RELEASE();
442
- }
443
-