mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.3.4.1'
This commit is contained in:
@@ -64,7 +64,7 @@ public class Xoh_href_parser {
|
||||
if (ttl == null) // invalid ttl; null out page;
|
||||
tmp_page = Bry_.Empty;
|
||||
else
|
||||
tmp_page = ttl.Full_txt();
|
||||
tmp_page = ttl.Full_txt_w_ttl_case();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,7 @@ public class Xoh_href_parser {
|
||||
}
|
||||
}
|
||||
private static final byte Seg_wiki_tid = 0, Seg_site_tid = 1, Seg_xcmd_tid = 2;
|
||||
private static final Btrie_slim_mgr btrie = Btrie_slim_mgr.ci_a7() // NOTE:ci.ascii:XO_const.en; /wiki/, /site/ etc.
|
||||
private static final Btrie_slim_mgr btrie = Btrie_slim_mgr.ci_a7() // NOTE:ci.ascii:XO_const.en; /wiki/, /site/ etc.
|
||||
.Add_bry_tid(Xoh_href_.Bry__wiki, Seg_wiki_tid)
|
||||
.Add_bry_tid(Xoh_href_.Bry__site, Seg_site_tid)
|
||||
.Add_bry_tid(Xoh_href_.Bry__xcmd, Seg_xcmd_tid);
|
||||
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.xowa.htmls.hrefs; import gplx.*; import gplx.xowa.*; import gplx.xowa.htmls.*;
|
||||
import org.junit.*; import gplx.xowa.apps.urls.*; import gplx.xowa.wikis.nss.*;
|
||||
public class Xoh_href_parser_tst {
|
||||
private final Xoh_href_parser_fxt fxt = new Xoh_href_parser_fxt();
|
||||
private final Xoh_href_parser_fxt fxt = new Xoh_href_parser_fxt();
|
||||
@Test public void Wiki__basic() {
|
||||
fxt.Run_parse_by_href("/wiki/A").Chk_tid(Xoa_url_.Tid_page).Chk_to_str("en.wikipedia.org/wiki/A").Chk_wiki("en.wikipedia.org").Chk_page("A");
|
||||
}
|
||||
@@ -115,10 +115,10 @@ public class Xoh_href_parser_tst {
|
||||
// ;
|
||||
// }
|
||||
}
|
||||
class Xoh_href_parser_fxt extends Xoa_url_parser_fxt { private final Xoh_href_parser href_parser = new Xoh_href_parser();
|
||||
class Xoh_href_parser_fxt extends Xow_url_parser_fxt { private final Xoh_href_parser href_parser = new Xoh_href_parser();
|
||||
public Xoh_href_parser_fxt Run_parse_by_href(String raw) {
|
||||
href_parser.Parse_as_url(actl_url, Bry_.new_u8(raw), cur_wiki, Bry__page_1);
|
||||
return this;
|
||||
}
|
||||
private static final byte[] Bry__page_1 = Bry_.new_a7("Page 1");
|
||||
private static final byte[] Bry__page_1 = Bry_.new_a7("Page 1");
|
||||
}
|
||||
|
||||
@@ -39,8 +39,8 @@ class Xoh_href_wtr_fxt {
|
||||
private final Bry_bfr tmp_bfr = Bry_bfr.reset_(255);
|
||||
private final Xoh_href_wtr href_wtr = new Xoh_href_wtr();
|
||||
public Xoh_href_wtr_fxt() {
|
||||
this.app = Xoa_app_fxt.app_();
|
||||
this.wiki = Xoa_app_fxt.wiki_tst_(app);
|
||||
this.app = Xoa_app_fxt.Make__app__edit();
|
||||
this.wiki = Xoa_app_fxt.Make__wiki__edit(app);
|
||||
wiki.Xwiki_mgr().Add_by_csv(Bry_.new_a7("1|wikt|en.wiktionary.org"));
|
||||
app.Usere().Wiki().Xwiki_mgr().Add_by_csv(Bry_.new_a7("1|en.wiktionary.org|en.wiktionary.org"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user