aboutsummaryrefslogtreecommitdiff
path: root/doc-tool/test/TemplateErrorTests.scala
blob: 3359c7791fc89f064439ce37c1f10b033a87a780 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package dotty.tools
package dottydoc
package staticsite

import org.junit.Test
import org.junit.Assert._

class TemplateErrorTests extends DottyDocTest with SourceFileOps {
  @Test def unclosedTag: Unit = {
    htmlPage(
      """|Yo dawg:
         |{% include "stuff"
         |I heard you like to include stuff""".stripMargin
    ).html
  }

  @Test def missingEndif: Unit = {
    htmlPage(
      """|{% if someStuff %}
         |Dude
         |""".stripMargin
    ).html
  }

  @Test def nonExistingTag: Unit = {
    htmlPage(
      """|{% someStuff 'ofDude' %}
         |Dude
         |""".stripMargin
    ).html
  }
}