mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.11.4.1
This commit is contained in:
@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.xtns.scribunto; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
|
||||
import gplx.core.envs.*;
|
||||
import gplx.xowa.langs.*;
|
||||
import gplx.xowa.xtns.scribunto.libs.*; import gplx.xowa.xtns.scribunto.engines.*;
|
||||
import gplx.xowa.parsers.*; import gplx.xowa.parsers.tmpls.*;
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.xtns.scribunto; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
|
||||
import gplx.core.brys.fmtrs.*;
|
||||
import gplx.core.brys.fmtrs.*; import gplx.core.envs.*;
|
||||
import gplx.langs.htmls.*;
|
||||
import gplx.xowa.langs.kwds.*; import gplx.xowa.langs.msgs.*;
|
||||
import gplx.xowa.wikis.nss.*;
|
||||
|
||||
@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.xtns.scribunto.engines.luaj; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.scribunto.*; import gplx.xowa.xtns.scribunto.engines.*;
|
||||
import gplx.core.envs.*;
|
||||
import org.luaj.vm2.*; import org.luaj.vm2.lib.*; import org.luaj.vm2.lib.jse.*;
|
||||
import gplx.xowa.xtns.scribunto.engines.process.*;
|
||||
public class Luaj_server implements Scrib_server {
|
||||
|
||||
@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.xtns.scribunto.libs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.scribunto.*;
|
||||
import gplx.core.primitives.*;
|
||||
import gplx.core.primitives.*; import gplx.core.envs.*; import gplx.core.errs.*;
|
||||
import gplx.xowa.langs.*; import gplx.xowa.langs.funcs.*;
|
||||
import gplx.xowa.parsers.*; import gplx.xowa.parsers.tmpls.*;
|
||||
public class Scrib_lib_mw implements Scrib_lib {
|
||||
@@ -377,7 +377,7 @@ public class Scrib_lib_mw implements Scrib_lib {
|
||||
return rslt.Init_ary_empty();
|
||||
}
|
||||
}
|
||||
class Scrib_lib_mw_callParserFunction_sorter implements gplx.lists.ComparerAble {
|
||||
class Scrib_lib_mw_callParserFunction_sorter implements gplx.core.lists.ComparerAble {
|
||||
public int compare(Object lhsObj, Object rhsObj) {
|
||||
KeyVal lhs = (KeyVal)lhsObj;
|
||||
KeyVal rhs = (KeyVal)rhsObj;
|
||||
|
||||
@@ -30,7 +30,7 @@ public class Scrib_lib_mw__invoke_tst {
|
||||
@Test public void GetAllExpandedArguments_ws_prm_key_missing() { // PURPOSE: do not trim val if key missing; parameterized value ("{{{1}}}")
|
||||
fxt.Init_tmpl("{{#invoke:Mod_0|Prc_0|{{{1}}}}}");
|
||||
fxt.Init_page("{{test| a }}");
|
||||
fxt.Test_lib_proc(lib, Scrib_lib_mw.Invk_getAllExpandedArguments, Object_.Ary("current"), "\n a"); // " a " -> " a" // tmpl.trim_end: always trim end; DATE:2015-11-07
|
||||
fxt.Test_lib_proc(lib, Scrib_lib_mw.Invk_getAllExpandedArguments, Object_.Ary("current"), "\n a "); // " a " -> " a "
|
||||
}
|
||||
@Test public void GetAllExpandedArguments__ignore_empty_key() {// PURPOSE: ignore arguents that have an empty key (|=8|); EX:w:Fool's_mate; DATE:2014-03-05
|
||||
fxt.Init_tmpl("{{#invoke:Mod_0|Prc_0}}");
|
||||
@@ -45,7 +45,7 @@ public class Scrib_lib_mw__invoke_tst {
|
||||
}
|
||||
@Test public void GetExpandedArgument_ws_key_missing() { // PURPOSE: do not trim val if key missing; literal value
|
||||
fxt.Init_page("{{#invoke:Mod_0|Prc_0| a }}");
|
||||
fxt.Test_lib_proc(lib, Scrib_lib_mw.Invk_getExpandedArgument, Object_.Ary("current", "1") , " a"); // " a " -> " a" // tmpl.trim_end: always trim end; DATE:2015-11-07
|
||||
fxt.Test_lib_proc(lib, Scrib_lib_mw.Invk_getExpandedArgument, Object_.Ary("current", "1") , " a "); // " a " -> " a "
|
||||
}
|
||||
@Test public void GetExpandedArgument_ws_key_prm_key_exists() { // PURPOSE: trim val if key exists; parameterized value ("key={{{1}}}")
|
||||
fxt.Init_tmpl("{{#invoke:Mod_0|Prc_0|key1={{{1}}}}}");
|
||||
@@ -55,7 +55,7 @@ public class Scrib_lib_mw__invoke_tst {
|
||||
@Test public void GetExpandedArgument_ws_key_prm_key_missing() { // PURPOSE: do not trim val if key missing; parameterized value ("{{{1}}}")
|
||||
fxt.Init_tmpl("{{#invoke:Mod_0|Prc_0|{{{1}}}}}");
|
||||
fxt.Init_page("{{test| a }}");
|
||||
fxt.Test_lib_proc(lib, Scrib_lib_mw.Invk_getExpandedArgument, Object_.Ary("current", "1") , " a"); // " a " -> " a" // tmpl.trim_end: always trim end; DATE:2015-11-07
|
||||
fxt.Test_lib_proc(lib, Scrib_lib_mw.Invk_getExpandedArgument, Object_.Ary("current", "1") , " a "); // " a " -> " a "
|
||||
}
|
||||
@Test public void Preprocess() {
|
||||
this.Init_preprocess();
|
||||
|
||||
@@ -188,7 +188,7 @@ class Scrib_lib_text__json_util {
|
||||
Opt__force_assoc = 1
|
||||
;
|
||||
}
|
||||
class KeyVal__sorter__key_is_numeric implements gplx.lists.ComparerAble {
|
||||
class KeyVal__sorter__key_is_numeric implements gplx.core.lists.ComparerAble {
|
||||
public int compare(Object lhsObj, Object rhsObj) {
|
||||
KeyVal lhs_itm = (KeyVal)lhsObj;
|
||||
KeyVal rhs_itm = (KeyVal)rhsObj;
|
||||
|
||||
Reference in New Issue
Block a user