The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
tests:
  - name: Inline
    desc: Comment blocks should be removed from the template.
    data: { }
    template: '12345{{! Comment Block! }}67890'
    expected: '1234567890'

  - name: Multiline
    desc: Multiline comments should be permitted.
    data: { }
    template: |
      12345{{!
        This is a
        multi-line comment...
      }}67890
    expected: |
      1234567890

  - name: Standalone
    desc: All standalone comment lines should be removed.
    data: { }
    template: |
      Begin.
      {{! Comment Block! }}
      End.
    expected: |
      Begin.
      End.

  - name: Indented Standalone
    desc: All standalone comment lines should be removed.
    data: { }
    template: |
      Begin.
        {{! Indented Comment Block! }}
      End.
    expected: |
      Begin.
      End.

  - name: Multiline Standalone
    desc: All standalone comment lines should be removed.
    data: { }
    template: |
      Begin.
      {{!
      Something's going on here...
      }}
      End.
    expected: |
      Begin.
      End.

  - name: Indented Multiline Standalone
    desc: All standalone comment lines should be removed.
    data: { }
    template: |
      Begin.
        {{!
          Something's going on here...
        }}
      End.
    expected: |
      Begin.
      End.

  - name: Indented Inline
    desc: Inline comments should not strip whitespace
    data: { }
    template: "  12 {{! 34 }}\n"
    expected: "  12 \n"

  - name: Surrounding Whitespace
    desc: Comment removal should preserve surrounding whitespace.
    data: { }
    template: '12345 {{! Comment Block! }} 67890'
    expected: '12345  67890'