Luaj.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038
  1. <!DOCTYPE html>
  2. <html dir="ltr">
  3. <head>
  4. <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  5. <title>Diagnostics/Scribunto/Luaj - XOWA</title>
  6. <link rel="shortcut icon" href="https://gnosygnu.github.io/xowa/xowa_logo.png" />
  7. <link rel="stylesheet" href="https://gnosygnu.github.io/xowa/xowa_common.css" type="text/css">
  8. </head>
  9. <body class="mediawiki ltr sitedir-ltr ns-0 ns-subject skin-vector action-submit vector-animateLayout" spellcheck="false">
  10. <div id="mw-page-base" class="noprint"></div>
  11. <div id="mw-head-base" class="noprint"></div>
  12. <div id="content" class="mw-body">
  13. <h1 id="firstHeading" class="firstHeading"><span>Diagnostics/Scribunto/Luaj</span></h1>
  14. <div id="bodyContent" class="mw-body-content">
  15. <div id="siteSub">From XOWA: the free, open-source, offline wiki application</div>
  16. <div id="contentSub"></div>
  17. <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr">
  18. <h2>
  19. <span class="mw-headline" id="Luaj">Luaj</span>
  20. </h2>
  21. <ul>
  22. <li>
  23. Applies to the Luaj engine (as opposed to the Lua engine)
  24. </li>
  25. <li>
  26. Calls code in <a href="/wiki/Module:Diagnostics/Luaj" id="xolnki_2" title="Module:Diagnostics/Luaj">Module:Diagnostics/Luaj</a>
  27. </li>
  28. <li>
  29. Tests changes to the luaj_xowa.jar
  30. </li>
  31. <li>
  32. Further notes available at <a href="/wiki/App/Xtn/Mediawiki/Scribunto/Luaj" id="xolnki_3" title="App/Xtn/Mediawiki/Scribunto/Luaj">App/Xtn/Mediawiki/Scribunto/Luaj</a>
  33. </li>
  34. </ul>
  35. <h3>
  36. <span class="mw-headline" id="2.0.3_errors_fixed_in_3.0">2.0.3 errors fixed in 3.0</span>
  37. </h3>
  38. <table class="wikitable">
  39. <tr>
  40. <th>
  41. name
  42. </th>
  43. <th>
  44. code
  45. </th>
  46. <th>
  47. actl
  48. </th>
  49. <th>
  50. rslt
  51. </th>
  52. </tr>
  53. <tr>
  54. <td>
  55. <span style='color: green;'>pass</span>
  56. </td>
  57. <td>
  58. string.format fails for bad format; fails with ""
  59. </td>
  60. <td>
  61. {{#invoke:Diagnostics/Luaj|string_format_2|%d:%02.f|3|4}}
  62. </td>
  63. <td>
  64. 3:04
  65. <p>
  66. <br>
  67. </p>
  68. </td>
  69. </tr>
  70. <tr>
  71. <td>
  72. <span style='color: green;'>pass</span>
  73. </td>
  74. <td>
  75. os.time does not handle dates before 1970 on Windows; fails with false on Windows<br>
  76. NOTE: always fails on Windows with the lua engine
  77. </td>
  78. <td>
  79. {{#invoke:Diagnostics/Luaj|os_time|1234|05|06}}
  80. </td>
  81. <td>
  82. true
  83. <p>
  84. <br>
  85. </p>
  86. </td>
  87. </tr>
  88. <tr>
  89. <td>
  90. <span style='color: green;'>pass</span>
  91. </td>
  92. <td>
  93. pairs.next fails when setting val to null; fails with ""
  94. </td>
  95. <td>
  96. {{#invoke:Diagnostics/Luaj|pairs_next}}
  97. </td>
  98. <td>
  99. ok
  100. <p>
  101. <br>
  102. </p>
  103. </td>
  104. </tr>
  105. </table>
  106. <h3>
  107. <span class="mw-headline" id="2.0.3_features_removed_from_3.0">2.0.3 features removed from 3.0</span>
  108. </h3>
  109. <table class="wikitable">
  110. <tr>
  111. <th>
  112. name
  113. </th>
  114. <th>
  115. code
  116. </th>
  117. <th>
  118. actl
  119. </th>
  120. <th>
  121. rslt
  122. </th>
  123. </tr>
  124. <tr>
  125. <td>
  126. <span style='color: green;'>pass</span>
  127. </td>
  128. <td>
  129. string.gfind deprecated; should be alias to gmatch; fails with ""
  130. </td>
  131. <td>
  132. {{#invoke:Diagnostics/Luaj|string_gfind|ab cd|%w+}}
  133. </td>
  134. <td>
  135. ab
  136. <p>
  137. <br>
  138. </p>
  139. </td>
  140. </tr>
  141. <tr>
  142. <td>
  143. <span style='color: green;'>pass</span>
  144. </td>
  145. <td>
  146. tonumber returns original value if value has decimal and base is 10; fails with ""
  147. </td>
  148. <td>
  149. {{#invoke:Diagnostics/Luaj|tonumber|12.34|10}}
  150. </td>
  151. <td>
  152. 12.34
  153. <p>
  154. <br>
  155. </p>
  156. </td>
  157. </tr>
  158. <tr>
  159. <td>
  160. <span style='color: green;'>pass</span>
  161. </td>
  162. <td>
  163. tonumber('-') should be nil not 0
  164. </td>
  165. <td>
  166. {{#invoke:Diagnostics/Luaj|tonumber_lone|-}}
  167. </td>
  168. <td>
  169. <p>
  170. <br>
  171. </p>
  172. </td>
  173. </tr>
  174. <tr>
  175. <td>
  176. <span style='color: green;'>pass</span>
  177. </td>
  178. <td>
  179. math.log10 deprecated; now calls Math.log10; fails with ""
  180. </td>
  181. <td>
  182. {{#invoke:Diagnostics/Luaj|math_log10|100}}
  183. </td>
  184. <td>
  185. 2
  186. <p>
  187. <br>
  188. </p>
  189. </td>
  190. </tr>
  191. <tr>
  192. <td>
  193. <span style='color: green;'>pass</span>
  194. </td>
  195. <td>
  196. math.mod deprecated; now aliased to math.fmod; fails with ""
  197. </td>
  198. <td>
  199. {{#invoke:Diagnostics/Luaj|math_mod|3|2}}
  200. </td>
  201. <td>
  202. 1
  203. <p>
  204. <br>
  205. </p>
  206. </td>
  207. </tr>
  208. <tr>
  209. <td>
  210. <span style='color: green;'>pass</span>
  211. </td>
  212. <td>
  213. table.maxn deprecated; fails with ""
  214. </td>
  215. <td>
  216. {{#invoke:Diagnostics/Luaj|table_maxn}}
  217. </td>
  218. <td>
  219. 3
  220. <p>
  221. <br>
  222. </p>
  223. </td>
  224. </tr>
  225. <tr>
  226. <td>
  227. <span style='color: green;'>pass</span>
  228. </td>
  229. <td>
  230. table.getn deprecated -- key_is_num; fails with ""
  231. </td>
  232. <td>
  233. {{#invoke:Diagnostics/Luaj|table_getn__key_is_num}}
  234. </td>
  235. <td>
  236. 3
  237. <p>
  238. <br>
  239. </p>
  240. </td>
  241. </tr>
  242. <tr>
  243. <td>
  244. <span style='color: green;'>pass</span>
  245. </td>
  246. <td>
  247. table.getn deprecated -- key_is_str; fails with ""
  248. </td>
  249. <td>
  250. {{#invoke:Diagnostics/Luaj|table_getn__key_is_str}}
  251. </td>
  252. <td>
  253. 0
  254. <p>
  255. <br>
  256. </p>
  257. </td>
  258. </tr>
  259. <tr>
  260. <td>
  261. <span style='color: green;'>pass</span>
  262. </td>
  263. <td>
  264. automatic arg variable in varargs function deprecated; fails with ""
  265. </td>
  266. <td>
  267. {{#invoke:Diagnostics/Luaj|varargs_arg}}
  268. </td>
  269. <td>
  270. a
  271. <p>
  272. <br>
  273. </p>
  274. </td>
  275. </tr>
  276. </table>
  277. <h3>
  278. <span class="mw-headline" id="3.0_defects">3.0 defects</span>
  279. </h3>
  280. <table class="wikitable">
  281. <tr>
  282. <th>
  283. name
  284. </th>
  285. <th>
  286. code
  287. </th>
  288. <th>
  289. actl
  290. </th>
  291. <th>
  292. rslt
  293. </th>
  294. </tr>
  295. <tr>
  296. <td>
  297. <span style='color: green;'>pass</span>
  298. </td>
  299. <td>
  300. tonumber should trim all white space, not just \s; fails with ""
  301. </td>
  302. <td>
  303. {{#invoke:Diagnostics/Luaj|value_tonumber_trim}}
  304. </td>
  305. <td>
  306. 123
  307. <p>
  308. <br>
  309. </p>
  310. </td>
  311. </tr>
  312. <tr>
  313. <td>
  314. <span style='color: green;'>pass</span>
  315. </td>
  316. <td>
  317. string.rep fails if negative repetition; return ""; fails with ""
  318. </td>
  319. <td>
  320. {{#invoke:Diagnostics/Luaj|string_rep_test|a|-1}}
  321. </td>
  322. <td>
  323. pass:
  324. <p>
  325. <br>
  326. </p>
  327. </td>
  328. </tr>
  329. <tr>
  330. <td>
  331. <span style='color: green;'>pass</span>
  332. </td>
  333. <td>
  334. string.gsub fails with ArrayIndexOutOfBoundsException; check for OutOfBounds; fails with ""
  335. </td>
  336. <td>
  337. {{#invoke:Diagnostics/Luaj|string_gsub|a#b|#|}}
  338. </td>
  339. <td>
  340. ab
  341. <p>
  342. <br>
  343. </p>
  344. </td>
  345. </tr>
  346. <tr>
  347. <td>
  348. <span style='color: green;'>pass</span>
  349. </td>
  350. <td>
  351. string.gsub fails if src is empty string; exit early if empty; fails with ""
  352. </td>
  353. <td>
  354. {{#invoke:Diagnostics/Luaj|string_gsub||%b&lt;&gt;|}}
  355. </td>
  356. <td>
  357. <p>
  358. <br>
  359. </p>
  360. </td>
  361. </tr>
  362. <tr>
  363. <td>
  364. <span style='color: green;'>pass</span>
  365. </td>
  366. <td>
  367. string.gmatch: non-match
  368. </td>
  369. <td>
  370. {{#invoke:Diagnostics/Luaj|string_gmatch|a|[^,]*}}
  371. </td>
  372. <td>
  373. a;;
  374. <p>
  375. <br>
  376. </p>
  377. </td>
  378. </tr>
  379. <tr>
  380. <td>
  381. <span style='color: green;'>pass</span>
  382. </td>
  383. <td>
  384. string.gmatch: match
  385. </td>
  386. <td>
  387. {{#invoke:Diagnostics/Luaj|string_gmatch|a,b|[^,]*}}
  388. </td>
  389. <td>
  390. a;;b;;
  391. <p>
  392. <br>
  393. </p>
  394. </td>
  395. </tr>
  396. <tr>
  397. <td>
  398. <span style='color: green;'>pass</span>
  399. </td>
  400. <td>
  401. string.gmatch: convert example; plain text
  402. </td>
  403. <td>
  404. {{#invoke:Diagnostics/Luaj|string_gmatch_convert|a}}
  405. </td>
  406. <td>
  407. <p>
  408. <br>
  409. </p>
  410. </td>
  411. </tr>
  412. <tr>
  413. <td>
  414. <span style='color: green;'>pass</span>
  415. </td>
  416. <td>
  417. string.gmatch: convert example; lnki
  418. </td>
  419. <td>
  420. {{#invoke:Diagnostics/Luaj|string_gmatch_convert|[[a]]}}
  421. </td>
  422. <td>
  423. <p>
  424. <br>
  425. </p>
  426. </td>
  427. </tr>
  428. <tr>
  429. <td>
  430. <span style='color: green;'>pass</span>
  431. </td>
  432. <td>
  433. string.format does not use format args for double; call java.lang.String.format; fails with 1.234
  434. </td>
  435. <td>
  436. {{#invoke:Diagnostics/Luaj|string_format|%.1f|1.234}}
  437. </td>
  438. <td>
  439. 1.2
  440. <p>
  441. <br>
  442. </p>
  443. </td>
  444. </tr>
  445. <tr>
  446. <td>
  447. <span style='color: green;'>pass</span>
  448. </td>
  449. <td>
  450. string.format fails for bad format; fails with ""
  451. </td>
  452. <td>
  453. {{#invoke:Diagnostics/Luaj|string_format|(%0.1f%%)|1.234}}
  454. </td>
  455. <td>
  456. (1.2%)
  457. <p>
  458. <br>
  459. </p>
  460. </td>
  461. </tr>
  462. <tr>
  463. <td>
  464. <span style='color: green;'>pass</span>
  465. </td>
  466. <td>
  467. string.format fails if no number after "."; fails with ""
  468. </td>
  469. <td>
  470. {{#invoke:Diagnostics/Luaj|string_format|%02.f|3}}
  471. </td>
  472. <td>
  473. 03
  474. <p>
  475. <br>
  476. </p>
  477. </td>
  478. </tr>
  479. <tr>
  480. <td>
  481. <span style='color: green;'>pass</span>
  482. </td>
  483. <td>
  484. string.format fails for char; fails with ""
  485. </td>
  486. <td>
  487. {{#invoke:Diagnostics/Luaj|string_format|%c|97}}
  488. </td>
  489. <td>
  490. a
  491. <p>
  492. <br>
  493. </p>
  494. </td>
  495. </tr>
  496. <tr>
  497. <td>
  498. <span style='color: green;'>pass</span>
  499. </td>
  500. <td>
  501. string.format fails for multibyte chars; fails with ""
  502. </td>
  503. <td>
  504. {{#invoke:Diagnostics/Luaj|string_format|âbç%f|1}}
  505. </td>
  506. <td>
  507. âbç1.0
  508. <p>
  509. <br>
  510. </p>
  511. </td>
  512. </tr>
  513. <tr>
  514. <td>
  515. <span style='color: green;'>pass</span>
  516. </td>
  517. <td>
  518. multibyte strings not supported; fails with ""
  519. </td>
  520. <td>
  521. {{#invoke:Diagnostics/Luaj|string_multibyte_2}}
  522. </td>
  523. <td>
  524. â
  525. <p>
  526. <br>
  527. </p>
  528. </td>
  529. </tr>
  530. <tr>
  531. <td>
  532. <span style='color: green;'>pass</span>
  533. </td>
  534. <td>
  535. multibyte strings not supported; fails with ""
  536. </td>
  537. <td>
  538. {{#invoke:Diagnostics/Luaj|string_multibyte_3}}
  539. </td>
  540. <td>
  541. อา
  542. <p>
  543. <br>
  544. </p>
  545. </td>
  546. </tr>
  547. <tr>
  548. <td>
  549. <span style='color: green;'>pass</span>
  550. </td>
  551. <td>
  552. multibyte chars in lua variables; used to return "?"
  553. </td>
  554. <td>
  555. {{#invoke:Diagnostics/Luaj|ustring_match_multibyte|𠀀}}
  556. </td>
  557. <td>
  558. 𠀀
  559. <p>
  560. <br>
  561. </p>
  562. </td>
  563. </tr>
  564. <tr>
  565. <td>
  566. <span style='color: green;'>pass</span>
  567. </td>
  568. <td>
  569. handle backslash-escaped sequences like \239\191\185; used to return "11"
  570. </td>
  571. <td>
  572. {{#invoke:Diagnostics/Luaj|multibyte__backslash_escaped}}
  573. </td>
  574. <td>
  575. <p>
  576. <br>
  577. </p>
  578. </td>
  579. </tr>
  580. <tr>
  581. <td>
  582. <span style='color: green;'>pass</span>
  583. </td>
  584. <td>
  585. surrogate pair chars not supported; fails with ""
  586. </td>
  587. <td>
  588. {{#invoke:Diagnostics/Luaj|string_surrogate_pair}}
  589. </td>
  590. <td>
  591. 1
  592. <p>
  593. <br>
  594. </p>
  595. </td>
  596. </tr>
  597. <tr>
  598. <td>
  599. <span style='color: green;'>pass</span>
  600. </td>
  601. <td>
  602. table.concat fails if end is nil; convert nil to list len; fails with ""
  603. </td>
  604. <td>
  605. {{#invoke:Diagnostics/Luaj|table_concat|.|1||a|b|c}}
  606. </td>
  607. <td>
  608. a.b.c
  609. <p>
  610. <br>
  611. </p>
  612. </td>
  613. </tr>
  614. <tr>
  615. <td>
  616. <span style='color: green;'>pass</span>
  617. </td>
  618. <td>
  619. table.concat fails if sep is nil; convert nil to ""; fails with ""
  620. </td>
  621. <td>
  622. {{#invoke:Diagnostics/Luaj|table_concat_nil_sep}}
  623. </td>
  624. <td>
  625. ab
  626. <p>
  627. <br>
  628. </p>
  629. </td>
  630. </tr>
  631. <tr>
  632. <td>
  633. <span style='color: green;'>pass</span>
  634. </td>
  635. <td>
  636. table.concat fails if 1st argument is nil; fails with "bad argument: string expected, got nil"
  637. </td>
  638. <td>
  639. {{#invoke:Diagnostics/Luaj|table_remove_nil_arg_at_pos_1}}
  640. </td>
  641. <td>
  642. ab
  643. <p>
  644. <br>
  645. </p>
  646. </td>
  647. </tr>
  648. <tr>
  649. <td>
  650. <span style='color: green;'>pass</span>
  651. </td>
  652. <td>
  653. os_date does not accept utc argument; fails with ""<br>
  654. NOTE: test assumes EST / EDT; if ! is not applied, then date would be 1969-12-31
  655. </td>
  656. <td>
  657. {{#invoke:Diagnostics/Luaj|os_date|!*t|3600}}
  658. </td>
  659. <td>
  660. 1970-01-01
  661. <p>
  662. <br>
  663. </p>
  664. </td>
  665. </tr>
  666. <tr>
  667. <td>
  668. <span style='color: green;'>pass</span>
  669. </td>
  670. <td>
  671. os_date non-utc check;
  672. </td>
  673. <td>
  674. {{#invoke:Diagnostics/Luaj|os_date|*t|0}}
  675. </td>
  676. <td>
  677. 1969-12-31
  678. <p>
  679. <br>
  680. </p>
  681. </td>
  682. </tr>
  683. <tr>
  684. <td>
  685. <span style='color: green;'>pass</span>
  686. </td>
  687. <td>
  688. os_date format: %e; fails with ""; NOTE: test assumes time zone within 11 hours of UTC
  689. </td>
  690. <td>
  691. {{#invoke:Diagnostics/Luaj|os_date_format|%e|2014|07|15|1|2|3}}
  692. </td>
  693. <td>
  694. 15
  695. <p>
  696. <br>
  697. </p>
  698. </td>
  699. </tr>
  700. <tr>
  701. <td>
  702. <span style='color: green;'>pass</span>
  703. </td>
  704. <td>
  705. os_date format: %R; fails with ""
  706. </td>
  707. <td>
  708. {{#invoke:Diagnostics/Luaj|os_date_format|%R|2014|07|15|13|2|3}}
  709. </td>
  710. <td>
  711. 13:02
  712. <p>
  713. <br>
  714. </p>
  715. </td>
  716. </tr>
  717. <tr>
  718. <td>
  719. <span style='color: green;'>pass</span>
  720. </td>
  721. <td>
  722. match.balanced: fails with out of bounds;
  723. </td>
  724. <td>
  725. {{#invoke:Diagnostics/Luaj|string_match|a|%b()}}
  726. </td>
  727. <td>
  728. <p>
  729. <br>
  730. </p>
  731. </td>
  732. </tr>
  733. <tr>
  734. <td>
  735. <span style='color: green;'>pass</span>
  736. </td>
  737. <td>
  738. match.balanced: fails with out of bounds; ^ at beginning
  739. </td>
  740. <td>
  741. {{#invoke:Diagnostics/Luaj|string_match|a|^(.) ?%b()}}
  742. </td>
  743. <td>
  744. <p>
  745. <br>
  746. </p>
  747. </td>
  748. </tr>
  749. <tr>
  750. <td>
  751. <span style='color: green;'>pass</span>
  752. </td>
  753. <td>
  754. match.frontier:error
  755. </td>
  756. <td>
  757. {{#invoke:Diagnostics/Luaj|string_gmatch|a|%f[%a]b}}
  758. </td>
  759. <td>
  760. <p>
  761. <br>
  762. </p>
  763. </td>
  764. </tr>
  765. <tr>
  766. <td>
  767. <span style='color: green;'>pass</span>
  768. </td>
  769. <td>
  770. match.frontier:bad-implementation; used to return ""
  771. </td>
  772. <td>
  773. {{#invoke:Diagnostics/Luaj|lua_match|bz|%f[%a][%a]z$}}
  774. </td>
  775. <td>
  776. bz
  777. <p>
  778. <br>
  779. </p>
  780. </td>
  781. </tr>
  782. <tr>
  783. <td>
  784. <span style='color: green;'>pass</span>
  785. </td>
  786. <td>
  787. tonumber hex fails if incomplete
  788. </td>
  789. <td>
  790. {{#invoke:Diagnostics/Luaj|tonumber_hex|0x}}
  791. </td>
  792. <td>
  793. <p>
  794. <br>
  795. </p>
  796. </td>
  797. </tr>
  798. <tr>
  799. <td>
  800. <span style='color: green;'>pass</span>
  801. </td>
  802. <td>
  803. tonumber hex check
  804. </td>
  805. <td>
  806. {{#invoke:Diagnostics/Luaj|tonumber_hex|0xFF}}
  807. </td>
  808. <td>
  809. 255
  810. <p>
  811. <br>
  812. </p>
  813. </td>
  814. </tr>
  815. <tr>
  816. <td>
  817. <span style='color: green;'>pass</span>
  818. </td>
  819. <td>
  820. string.gsub does not match $ at end of string
  821. </td>
  822. <td>
  823. {{#invoke:Diagnostics/Luaj|string_gsub|ab|e?$|1}}
  824. </td>
  825. <td>
  826. abe
  827. <p>
  828. <br>
  829. </p>
  830. </td>
  831. </tr>
  832. <tr>
  833. <td>
  834. <span style='color: green;'>pass</span>
  835. </td>
  836. <td>
  837. table.unpack does not handle nil args; fails with error
  838. </td>
  839. <td>
  840. {{#invoke:Diagnostics/Luaj|table_unpack_nil}}
  841. </td>
  842. <td>
  843. a,b,c,d
  844. <p>
  845. <br>
  846. </p>
  847. </td>
  848. </tr>
  849. <tr>
  850. <td>
  851. <span style='color: green;'>pass</span>
  852. </td>
  853. <td>
  854. surrogate pairs not handled correctly; fails with wrong 1st char: 𢱌
  855. </td>
  856. <td>
  857. {{#invoke:Diagnostics/Luaj|core_surrogate_pairs}}
  858. </td>
  859. <td>
  860. 𣂁 - 脁 - 晁
  861. <p>
  862. <br>
  863. </p>
  864. </td>
  865. </tr>
  866. <tr>
  867. <td>
  868. <span style='color: green;'>pass</span>
  869. </td>
  870. <td>
  871. zero-length regex fails
  872. </td>
  873. <td>
  874. {{#invoke:Diagnostics/Luaj|lua_match|text|}}
  875. </td>
  876. <td>
  877. <p>
  878. <br>
  879. </p>
  880. </td>
  881. </tr>
  882. <tr>
  883. <td>
  884. <span style='color: green;'>pass</span>
  885. </td>
  886. <td>
  887. utf-8 char fails
  888. </td>
  889. <td>
  890. {{#invoke:Diagnostics/Luaj|var|â|}}
  891. </td>
  892. <td>
  893. â
  894. <p>
  895. <br>
  896. </p>
  897. </td>
  898. </tr>
  899. <tr>
  900. <td>
  901. <span style='color: green;'>pass</span>
  902. </td>
  903. <td>
  904. fails if "2." is coerced to 2
  905. </td>
  906. <td>
  907. {{#invoke:Diagnostics/Luaj|table_overwrite_int_with_string}}
  908. </td>
  909. <td>
  910. 2.
  911. <p>
  912. <br>
  913. </p>
  914. </td>
  915. </tr>
  916. <tr>
  917. <td>
  918. <span style='color: green;'>pass</span>
  919. </td>
  920. <td>
  921. fails if "a1"
  922. </td>
  923. <td>
  924. {{#invoke:Diagnostics/Luaj|loadDataTest}}
  925. </td>
  926. <td>
  927. pass1
  928. <p>
  929. <br>
  930. </p>
  931. </td>
  932. </tr>
  933. </table>
  934. </div>
  935. </div>
  936. </div>
  937. <div id="mw-head" class="noprint">
  938. <div id="left-navigation">
  939. <div id="p-namespaces" class="vectorTabs">
  940. <h3>Namespaces</h3>
  941. <ul>
  942. <li id="ca-nstab-main" class="selected"><span><a id="ca-nstab-main-href" href="index.html">Page</a></span></li>
  943. </ul>
  944. </div>
  945. </div>
  946. </div>
  947. <div id='mw-panel' class='noprint'>
  948. <div id='p-logo'>
  949. <a style="background-image: url(https://gnosygnu.github.io/xowa/xowa_logo.png);" href="http://xowa.org/" title="Visit the main page"></a>
  950. </div>
  951. <div class="portal" id='xowa-portal-home'>
  952. <h3>XOWA</h3>
  953. <div class="body">
  954. <ul>
  955. <li><a href="http://xowa.org/index.html" title='Visit the main page'>Main page</a></li>
  956. <li><a href="http://xowa.org/screenshots.html" title='See screenshots of XOWA'>Screenshots</a></li>
  957. <li><a href="https://www.youtube.com/watch?v=q0qbXYXEH6M" title="See a video of XOWA Desktop in action">Video</a></li>
  958. <li><a href="http://xowa.org/home/wiki/Help/Download_XOWA.html" title='Download the XOWA application'>Download XOWA</a></li>
  959. <li><a href="http://xowa.org/home/wiki/Dashboard/Image_databases.html" title='Download offline wikis and image databases'>Download wikis</a></li>
  960. </ul>
  961. </div>
  962. </div>
  963. <div class="portal" id='xowa-portal-started'>
  964. <h3>Getting started</h3>
  965. <div class="body">
  966. <ul>
  967. <li><a href="http://xowa.org/home/wiki/App/Setup/System_requirements.html" title='Get XOWA&apos;s system requirements'>Requirements</a></li>
  968. <li><a href="http://xowa.org/home/wiki/App/Setup/Installation.html" title='Get instructions for installing XOWA'>Installation</a></li>
  969. <li><a href="http://xowa.org/home/wiki/App/Import/Simple_Wikipedia.html" title='Learn how to set up Simple Wikipedia'>Simple Wikipedia</a></li>
  970. <li><a href="http://xowa.org/home/wiki/App/Import/English_Wikipedia.html" title='Learn how to set up English Wikipedia'>English Wikipedia</a></li>
  971. <li><a href="http://xowa.org/home/wiki/App/Import/Other_wikis.html" title='Learn how to set up other Wikipedias'>Other Wikipedias</a></li>
  972. </ul>
  973. </div>
  974. </div>
  975. <div class="portal" id='xowa-portal-android'>
  976. <h3>Android</h3>
  977. <div class="body">
  978. <ul>
  979. <li><a href="http://xowa.org/home/wiki/Android/Setup.html" title='Setup XOWA on your Android device'>Setup</a></li>
  980. <li><a href="https://www.youtube.com/watch?v=jsMTBxGweUw" title="See a video of XOWA Android in action">Video</a></li>
  981. </ul>
  982. </div>
  983. </div>
  984. <div class="portal" id='xowa-portal-help'>
  985. <h3>Help</h3>
  986. <div class="body">
  987. <ul>
  988. <li><a href="http://xowa.org/home/wiki/Help/About.html" title='Get more information about XOWA'>About</a></li>
  989. <li><a href="http://xowa.org/home/wiki/Help/Contents.html" title='View a list of help topics'>Contents</a></li>
  990. <li><a href="http://xowa.org/home/wiki/Help/Media.html" title='Read what others have written about XOWA'>Media</a></li>
  991. <li><a href="http://xowa.org/home/wiki/Help/Feedback.html" title='Questions? Comments? Leave feedback for XOWA'>Feedback</a></li>
  992. </ul>
  993. </div>
  994. </div>
  995. <div class="portal" id='xowa-portal-blog'>
  996. <h3>Blog</h3>
  997. <div class="body">
  998. <ul>
  999. <li><a href="http://xowa.org/home/wiki/Blog.html" title='Follow XOWA''s development process'>Current</a></li>
  1000. </ul>
  1001. </div>
  1002. </div>
  1003. <div class="portal" id='xowa-portal-links'>
  1004. <h3>Links</h3>
  1005. <div class="body">
  1006. <ul>
  1007. <li><a href="http://dumps.wikimedia.org/backup-index.html" title="Get wiki datababase dumps directly from Wikimedia">Wikimedia dumps</a></li>
  1008. <li><a href="https://archive.org/search.php?query=xowa" title="Search archive.org for XOWA files">XOWA @ archive.org</a></li>
  1009. <li><a href="http://en.wikipedia.org" title="Visit Wikipedia (and compare to XOWA!)">English Wikipedia</a></li>
  1010. </ul>
  1011. </div>
  1012. </div>
  1013. <div class="portal" id='xowa-portal-donate'>
  1014. <h3>Donate</h3>
  1015. <div class="body">
  1016. <ul>
  1017. <li><a href="https://archive.org/donate/index.php" title="Support archive.org!">archive.org</a></li><!-- listed first due to recent fire damages: http://blog.archive.org/2013/11/06/scanning-center-fire-please-help-rebuild/ -->
  1018. <li><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector" title="Support Wikipedia!">Wikipedia</a></li>
  1019. <li><a href="http://xowa.org/home/wiki/Help/Donate.html" title="Support XOWA!">XOWA</a></li>
  1020. </ul>
  1021. </div>
  1022. </div>
  1023. </div>
  1024. </body>
  1025. </html>