...
1
2
3 package gonja_test
4
5 import (
6 "testing"
7
8 tu "github.com/noirbizarre/gonja/testutils"
9 )
10
11 func TestTemplates(t *testing.T) {
12
13 root := "./testData"
14 env := tu.TestEnv(root)
15 env.Globals.Set("this_is_a_global_variable", "this is a global text")
16 tu.GlobTemplateTests(t, root, env)
17 }
18
19 func TestExpressions(t *testing.T) {
20 root := "./testData/expressions"
21 env := tu.TestEnv(root)
22 tu.GlobTemplateTests(t, root, env)
23 }
24
25 func TestFilters(t *testing.T) {
26 root := "./testData/filters"
27 env := tu.TestEnv(root)
28 tu.GlobTemplateTests(t, root, env)
29 }
30
31 func TestFunctions(t *testing.T) {
32 root := "./testData/functions"
33 env := tu.TestEnv(root)
34 tu.GlobTemplateTests(t, root, env)
35 }
36
37 func TestTests(t *testing.T) {
38 root := "./testData/tests"
39 env := tu.TestEnv(root)
40 tu.GlobTemplateTests(t, root, env)
41 }
42
43 func TestStatements(t *testing.T) {
44 root := "./testData/statements"
45 env := tu.TestEnv(root)
46 tu.GlobTemplateTests(t, root, env)
47 }
48
49
50
51
52
53
54
55
56
View as plain text