-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Duplicate tests for insert & replace processors, #178
- Loading branch information
Showing
2 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
tests/nz/net/ultraq/thymeleaf/tests/includes/Insert-NestedFragmentInfiniteLoop.thtest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
|
||
# Test for an infinite loop when nesting fragments, based off | ||
# /~https://github.com/ultraq/thymeleaf-layout-dialect/issues/178 | ||
|
||
%TEMPLATE_MODE HTML | ||
|
||
|
||
%INPUT | ||
<html> | ||
<body> | ||
<div layout:fragment="comment"> | ||
Comment structure | ||
<div layout:fragment="comment-details">Default comment details</div> | ||
</div> | ||
|
||
<div layout:insert="~{::comment}"> | ||
<div layout:fragment="comment-details"> | ||
Top level comment | ||
<div layout:insert="~{::comment}"> | ||
<div layout:fragment="comment-details">Nested comment</div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> | ||
|
||
%OUTPUT | ||
<html> | ||
<body> | ||
<div> | ||
Comment structure | ||
<div>Default comment details</div> | ||
</div> | ||
<div> | ||
<div> | ||
Comment structure | ||
<div> | ||
Top level comment | ||
<div> | ||
<div> | ||
Comment structure | ||
<div>Nested comment</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
45 changes: 45 additions & 0 deletions
45
tests/nz/net/ultraq/thymeleaf/tests/includes/Replace-NestedFragmentInfiniteLoop.thtest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
# Test for an infinite loop when nesting fragments, based off | ||
# /~https://github.com/ultraq/thymeleaf-layout-dialect/issues/178 | ||
|
||
%TEMPLATE_MODE HTML | ||
|
||
|
||
%INPUT | ||
<html> | ||
<body> | ||
<div layout:fragment="comment"> | ||
Comment structure | ||
<div layout:fragment="comment-details">Default comment details</div> | ||
</div> | ||
|
||
<div layout:replace="~{::comment}"> | ||
<div layout:fragment="comment-details"> | ||
Top level comment | ||
<div layout:replace="~{::comment}"> | ||
<div layout:fragment="comment-details">Nested comment</div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> | ||
|
||
%OUTPUT | ||
<html> | ||
<body> | ||
<div> | ||
Comment structure | ||
<div>Default comment details</div> | ||
</div> | ||
<div> | ||
Comment structure | ||
<div> | ||
Top level comment | ||
<div> | ||
Comment structure | ||
<div>Nested comment</div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |