コード例 #1
0
ファイル: GHIssueTest.java プロジェクト: stather/Rythm
  @Test
  public void test122() {
    System.getProperties()
        .put(RythmConfigurationKey.DEFAULT_CODE_TYPE_IMPL.getKey(), ICodeType.DefImpl.HTML);
    t = "@args String src;<script src='@src'></script><script src='@src'></script>";
    s = r(t, "/js/abc");
    eq("<script src='/js/abc'></script><script src='/js/abc'></script>");

    t = "@args models.Foo foo;<script src='@foo.bar()._x()'></script>";
    s = r(t, new Foo());
    eq("<script src=''></script>");
  }
コード例 #2
0
ファイル: GHIssueTest.java プロジェクト: stather/Rythm
 @Test
 public void test155() {
   String x = "\uD83D\uDE30";
   assertEquals(x, S.escapeCSV(x).toString());
   assertEquals(x, Escape.CSV.apply(x).toString());
   System.getProperties()
       .setProperty(
           RythmConfigurationKey.DEFAULT_CODE_TYPE_IMPL.getKey(),
           "org.rythmengine.extension.ICodeType.DefImpl.CSV");
   t = "@s";
   s = r(t, x);
   eq(x);
 }