Skip to content

Commit

Permalink
Restructured tests for thymeleaf/thymeleaf#809 (OGNL)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfernandez committed Dec 14, 2020
1 parent b23c1fc commit 29c4d41
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,18 @@ public void testAccessRestrictions() throws Exception {
}


@Test
public void testInstanceStaticRestrictions() throws Exception {

final TestExecutor executor = TestExecutorFactory.createTestExecutor();
executor.setThrottleStep(this.throttleStep);
executor.execute("classpath:templateengine/features/instancestaticrestrictions");

Assert.assertTrue(executor.isAllOK());

}


@Test
public void testInliningStandard() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%EXTENDS ../html5.01.common
%TEMPLATE_MODE HTML
# ------------------------------------------------------------
%INPUT
<p th:text="${new java.lang.String('hello')}">ALLOWED</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%EXTENDS ../html5.01.common
%TEMPLATE_MODE HTML
# ------------------------------------------------------------
%INPUT
<p th:text="${__${new java.lang.String('hello')}__}">NOT ALLOWED</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%EXTENDS ../html5.01.common
%TEMPLATE_MODE HTML
# ------------------------------------------------------------
%INPUT
<p th:at0="${new java.lang.String('hello')}">NOT ALLOWED</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%EXTENDS ../html5.01.common
%TEMPLATE_MODE HTML
# ------------------------------------------------------------
%INPUT
<p th:attr="at0=${new java.lang.String('hello')}">NOT ALLOWED</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%EXTENDS ../html5.01.common
%TEMPLATE_MODE HTML
# ------------------------------------------------------------
%INPUT
<p th:href="~{${new java.lang.String('hello')}}">NOT ALLOWED</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%EXTENDS ../html5.01.common
%TEMPLATE_MODE HTML
# ------------------------------------------------------------
%INPUT
<p th:insert="${new java.lang.String('hello')}">NOT ALLOWED</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%EXTENDS ../html5.01.common
%TEMPLATE_MODE HTML
# ------------------------------------------------------------
%INPUT
<p th:text="@{${new java.lang.String('hello')}}">NOT ALLOWED</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%EXTENDS ../html5.01.common
%TEMPLATE_MODE HTML
# ------------------------------------------------------------
%INPUT
<p th:text="${@org.thymeleaf.TemplateEngine@TIMER_LOGGER_NAME}">ALLOWED</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%EXTENDS ../html5.01.common
%TEMPLATE_MODE HTML
# ------------------------------------------------------------
%INPUT
<p th:text="${__${@org.thymeleaf.TemplateEngine@TIMER_LOGGER_NAME}__}">NOT ALLOWED</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%EXTENDS ../html5.01.common
%TEMPLATE_MODE HTML
# ------------------------------------------------------------
%INPUT
<p th:at0="${@org.thymeleaf.TemplateEngine@TIMER_LOGGER_NAME}">NOT ALLOWED</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%EXTENDS ../html5.01.common
%TEMPLATE_MODE HTML
# ------------------------------------------------------------
%INPUT
<p th:href="~{${@org.thymeleaf.TemplateEngine@TIMER_LOGGER_NAME}}">NOT ALLOWED</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%EXTENDS ../html5.01.common
%TEMPLATE_MODE HTML
# ------------------------------------------------------------
%INPUT
<p th:text="@{${@org.thymeleaf.TemplateEngine@TIMER_LOGGER_NAME}}">NOT ALLOWED</p>
Expand Down

0 comments on commit 29c4d41

Please sign in to comment.