From 2b59097c3f61fa901e91ac4cea48940760439578 Mon Sep 17 00:00:00 2001 From: Petr Štetiar Date: Fri, 19 Mar 2021 16:54:55 +0100 Subject: tests: create custom tests from current tests cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Petr Štetiar --- tests/00_syntax/12_block_whitespace_control | 47 ----------------------------- 1 file changed, 47 deletions(-) delete mode 100644 tests/00_syntax/12_block_whitespace_control (limited to 'tests/00_syntax/12_block_whitespace_control') diff --git a/tests/00_syntax/12_block_whitespace_control b/tests/00_syntax/12_block_whitespace_control deleted file mode 100644 index 911171c..0000000 --- a/tests/00_syntax/12_block_whitespace_control +++ /dev/null @@ -1,47 +0,0 @@ -By default, whitespace before a block start tag or after a block end tag -is retained. By suffixing the start tag or prefixing the end tag with a -dash, the leading or trailing whitespace is trimmed respectively. - --- Expect stdout -- -Whitespace control applies to all block types: -Comment before: | |, after: | |, both: || -Statement before: |test |, after: | test|, both: |test| -Expression before: |test |, after: | test|, both: |test| - -By default whitespace around a block is retained. -Leading whitespace can be trimmed like this. -The same applies to trailing whitespace. -It is also possible to trim bothleading and trailingwhitespace. - -Stripping works across multiple lines as well:test - -Likewise, stripping over multiple lines of trailing whitespace works as -expected too.This is after the block. --- End -- - --- Testcase -- -Whitespace control applies to all block types: -Comment before: | {#- test #} |, after: | {#- test #} |, both: | {#- test -#} | -Statement before: | {%- print("test") %} |, after: | {%+ print("test") -%} |, both: | {%- print("test") -%} | -Expression before: | {{- "test" }} |, after: | {{ "test" -}} |, both: | {{- "test" -}} | - -By default whitespace {{ "around a block" }} is retained. -Leading whitespace can be trimmed {#- note the leading dash #} like this. -The same applies to {# note the trailing dash -#} trailing whitespace. -It is also possible to trim both {{- "leading and trailing" -}} whitespace. - -Stripping works across multiple lines as well: - -{%- - /* The word "test" will be printed after "well:" above */ - print("test") -%} - - -Likewise, stripping over multiple lines of trailing whitespace works as -expected too. - -{#- Any whitespace after "expected too." and before "This is after the block" will be trimmed. -#} - -This is after the block. --- End -- -- cgit v1.2.3