z164_hdeHdrs_data_tst.java 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. XOWA: the XOWA Offline Wiki Application
  3. Copyright (C) 2012-2017 gnosygnu@gmail.com
  4. XOWA is licensed under the terms of the General Public License (GPL) Version 3,
  5. or alternatively under the terms of the Apache License Version 2.0.
  6. You may use XOWA according to either of these licenses as is most appropriate
  7. for your project on a case-by-case basis.
  8. The terms of each license can be found in the source code repository:
  9. GPLv3 License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-GPLv3.txt
  10. Apache License: https://github.com/gnosygnu/xowa/blob/master/LICENSE-APACHE2.txt
  11. */
  12. package gplx.gfml; import gplx.*;
  13. import org.junit.*;
  14. public class z164_hdeHdrs_data_tst {
  15. GfmlParse_fxt fx = GfmlParse_fxt.new_();
  16. @Before public void setup() {
  17. fx.ini_RootLxr_Add
  18. ( GfmlDocLxrs.Whitespace_lxr()
  19. , GfmlDocLxrs.NdeHeader_lxr()
  20. , GfmlDocLxrs.NdeInline_lxr()
  21. , GfmlDocLxrs.NdeBodyBgn_lxr()
  22. , GfmlDocLxrs.NdeBodyEnd_lxr()
  23. );
  24. }
  25. @Test public void Bas1() {
  26. fx.tst_Tkn("a:b;"
  27. , fx.tkn_grp_
  28. ( fx.tkn_itm_("a")
  29. , fx.tkn_itm_(":")
  30. , fx.tkn_grp_ary_("b")
  31. , fx.tkn_itm_(";")
  32. ));
  33. }
  34. @Test public void Basic3() {
  35. fx.tst_Tkn("a:b{c;}"
  36. , fx.tkn_grp_
  37. ( fx.tkn_itm_("a")
  38. , fx.tkn_itm_(":")
  39. , fx.tkn_grp_ary_("b")
  40. , fx.tkn_itm_("{")
  41. , fx.tkn_grp_
  42. ( fx.tkn_grp_ary_("c")
  43. , fx.tkn_itm_(";"))
  44. , fx.tkn_itm_("}")
  45. ));
  46. }
  47. }