mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.10.3.1
This commit is contained in:
@@ -22,7 +22,7 @@ public class Xow_ttl__anchor_tst {
|
||||
@Test public void Anch_y() {fxt.Init_ttl("a#b") .Expd_full_txt("A").Expd_page_txt("A").Expd_anch_txt("b").Test();}
|
||||
@Test public void Anch_only() {fxt.Init_ttl("#a") .Expd_full_txt("").Expd_page_txt("").Expd_anch_txt("a").Test();}
|
||||
@Test public void Anchor_fails() { // PURPOSE: :#batch:Main Page causes ttl to fail b/c # is treated as anchor; DATE:2013-01-02
|
||||
fxt.Wiki().Xwiki_mgr().Add_full(Bry_.new_a7("#batch"), Bry_.new_a7("none"));
|
||||
fxt.Wiki().Xwiki_mgr().Add_by_atrs(Bry_.new_a7("#batch"), Bry_.new_a7("none"));
|
||||
fxt.Init_ttl(":#batch:Main Page").Expd_full_txt("Main Page").Test();
|
||||
}
|
||||
@Test public void Anchor_angles() {// PURPOSE: angles in anchor should be encoded; DATE: 2013-01-23
|
||||
|
||||
@@ -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.wikis.ttls; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import org.junit.*; import gplx.xowa.nss.*;
|
||||
import org.junit.*; import gplx.xowa.wikis.nss.*;
|
||||
public class Xow_ttl__basic_tst {
|
||||
@Before public void init() {fxt.Reset();} private Xow_ttl_fxt fxt = new Xow_ttl_fxt();
|
||||
@Test public void Ns() {fxt.Init_ttl("Help:Test") .Expd_ns_id(Xow_ns_.Id_help).Expd_page_txt("Test").Test();}
|
||||
|
||||
@@ -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.wikis.ttls; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import org.junit.*; import gplx.xowa.nss.*;
|
||||
import org.junit.*; import gplx.xowa.wikis.nss.*;
|
||||
public class Xow_ttl__xwik_tst {
|
||||
@Before public void init() {fxt.Reset();} private Xow_ttl_fxt fxt = new Xow_ttl_fxt();
|
||||
@Test public void Known() {fxt.Init_ttl("fr:a") .Expd_xwik_txt("fr").Expd_ns_id(Xow_ns_.Id_main).Expd_page_txt("a").Test();}
|
||||
@@ -36,7 +36,7 @@ public class Xow_ttl__xwik_tst {
|
||||
fxt.Init_ttl(":::fr:Test").Expd_xwik_txt("").Expd_page_txt(":fr:Test").Expd_force_literal_link(1).Test();
|
||||
}
|
||||
@Test public void Ns_should_precede_xwiki() {// PURPOSE: the "Wikipedia" in "Wikipedia:Main page" should be interpreted as namespace, not an alias
|
||||
fxt.Wiki().Xwiki_mgr().Add_full(Bry_.new_a7("Wikipedia"), Bry_.new_a7("en.wikipedia.org"));
|
||||
fxt.Wiki().Xwiki_mgr().Add_by_atrs(Bry_.new_a7("Wikipedia"), Bry_.new_a7("en.wikipedia.org"));
|
||||
fxt.Init_ttl("Wikipedia:Test").Expd_xwik_txt("").Expd_full_txt("Wikipedia:Test").Test();
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class Xow_ttl_fxt {
|
||||
public Xowe_wiki Wiki() {return fxt.Wiki();}
|
||||
public void Reset() {
|
||||
fxt.Reset();
|
||||
fxt.Wiki().Xwiki_mgr().Add_full(Bry_.new_a7("fr"), Bry_.new_a7("fr.wikipedia.org"));
|
||||
fxt.Wiki().Xwiki_mgr().Add_by_atrs(Bry_.new_a7("fr"), Bry_.new_a7("fr.wikipedia.org"));
|
||||
test_raw = "Test page";
|
||||
expd_ns_id = Int_.Min_value;
|
||||
expd_xwik_txt = expd_full_txt = expd_full_url = expd_page_txt = expd_page_url = expd_leaf_txt = expd_leaf_url = expd_base_txt = expd_base_url
|
||||
|
||||
@@ -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.wikis.ttls; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.xowa.nss.*;
|
||||
import gplx.xowa.wikis.nss.*;
|
||||
public interface Xow_ttl_parser {
|
||||
Xoa_ttl Ttl_parse(byte[] ttl);
|
||||
Xoa_ttl Ttl_parse(int ns_id, byte[] ttl);
|
||||
|
||||
Reference in New Issue
Block a user