z123_quotes_quoteBlock_tst.java 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 z123_quotes_quoteBlock_tst {
  15. GfmlParse_fxt fx = GfmlParse_fxt.new_();
  16. @Before public void setup() {
  17. fx.ini_RootLxr_Add
  18. ( GfmlDocLxrs.NdeInline_lxr()
  19. , GfmlDocLxrs.QuoteBlock_lxr()
  20. );
  21. }
  22. @Test public void Basic() {
  23. fx.tst_Doc("|'abc'|;", fx.nde_().Atru_("abc"));
  24. }
  25. @Test public void Escape_bgn() {
  26. fx.tst_Doc("|'a|'|'b'|;", fx.nde_().Atru_("a|'b"));
  27. }
  28. @Test public void Escape_end() {
  29. fx.tst_Doc("|'a'|'|b'|;", fx.nde_().Atru_("a'|b"));
  30. }
  31. @Test public void Nest() {
  32. fx.tst_Doc("|'a|'-'|b'|;", fx.nde_().Atru_("a-b"));
  33. }
  34. }