diff --git a/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php b/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php index c07f11007..648920fe5 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Include/CompileIncludeTest.php @@ -330,6 +330,6 @@ public function dataTestSpacing() */ public function testInlineStringInclude() { - $this->assertEquals('include-inline', $this->smarty->fetch('inline_string_include.tpl')); + $this->assertEquals("include-inline\n", $this->smarty->fetch('inline_string_include.tpl')); } } diff --git a/tests/UnitTests/TemplateSource/TagTests/Include/templates/inline_string_include.tpl b/tests/UnitTests/TemplateSource/TagTests/Include/templates/inline_string_include.tpl index 44d7eb3a6..efcd791af 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Include/templates/inline_string_include.tpl +++ b/tests/UnitTests/TemplateSource/TagTests/Include/templates/inline_string_include.tpl @@ -1 +1 @@ -{include "string:include-inline" inline} \ No newline at end of file +{include "string:include-inline\n" inline} \ No newline at end of file diff --git a/tests/UnitTests/TemplateSource/_Issues/639/IncludeBlockToInlineIssue639Test.php b/tests/UnitTests/TemplateSource/_Issues/639/IncludeBlockToInlineIssue639Test.php new file mode 100644 index 000000000..12d7830c8 --- /dev/null +++ b/tests/UnitTests/TemplateSource/_Issues/639/IncludeBlockToInlineIssue639Test.php @@ -0,0 +1,38 @@ +setUpSmarty(dirname(__FILE__)); + } + + public function testInit() + { + $this->cleanDirs(); + } + + public function testInlineFirst() + { + $this->assertEquals("include-inline\ninclude-regular\n", $this->smarty->fetch('001_inline_first.tpl')); + } + public function testInlineLast() + { + $this->assertEquals("include-regular\ninclude-inline\n", $this->smarty->fetch('002_inline_last.tpl')); + } +} diff --git a/tests/UnitTests/TemplateSource/_Issues/639/cache/.gitignore b/tests/UnitTests/TemplateSource/_Issues/639/cache/.gitignore new file mode 100644 index 000000000..d88cc1446 --- /dev/null +++ b/tests/UnitTests/TemplateSource/_Issues/639/cache/.gitignore @@ -0,0 +1,2 @@ +# Ignore anything in here, but keep this directory +* diff --git a/tests/UnitTests/TemplateSource/_Issues/639/templates/001_inline_first.tpl b/tests/UnitTests/TemplateSource/_Issues/639/templates/001_inline_first.tpl new file mode 100644 index 000000000..ee8163eb1 --- /dev/null +++ b/tests/UnitTests/TemplateSource/_Issues/639/templates/001_inline_first.tpl @@ -0,0 +1,2 @@ +{include "string:include-inline\n" inline} +{include "string:include-regular\n"} diff --git a/tests/UnitTests/TemplateSource/_Issues/639/templates/002_inline_last.tpl b/tests/UnitTests/TemplateSource/_Issues/639/templates/002_inline_last.tpl new file mode 100644 index 000000000..208ee0f19 --- /dev/null +++ b/tests/UnitTests/TemplateSource/_Issues/639/templates/002_inline_last.tpl @@ -0,0 +1,2 @@ +{include "string:include-regular\n"} +{include "string:include-inline\n" inline} diff --git a/tests/UnitTests/TemplateSource/_Issues/639/templates_c/.gitignore b/tests/UnitTests/TemplateSource/_Issues/639/templates_c/.gitignore new file mode 100644 index 000000000..d88cc1446 --- /dev/null +++ b/tests/UnitTests/TemplateSource/_Issues/639/templates_c/.gitignore @@ -0,0 +1,2 @@ +# Ignore anything in here, but keep this directory +*