-
Notifications
You must be signed in to change notification settings - Fork 21
/
integration_test.go
55 lines (44 loc) · 1.18 KB
/
integration_test.go
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// +build integration
package gonja_test
import (
"testing"
tu "github.com/noirbizarre/gonja/testutils"
)
func TestTemplates(t *testing.T) {
// Add a global to the default set
root := "./testData"
env := tu.TestEnv(root)
env.Globals.Set("this_is_a_global_variable", "this is a global text")
tu.GlobTemplateTests(t, root, env)
}
func TestExpressions(t *testing.T) {
root := "./testData/expressions"
env := tu.TestEnv(root)
tu.GlobTemplateTests(t, root, env)
}
func TestFilters(t *testing.T) {
root := "./testData/filters"
env := tu.TestEnv(root)
tu.GlobTemplateTests(t, root, env)
}
func TestFunctions(t *testing.T) {
root := "./testData/functions"
env := tu.TestEnv(root)
tu.GlobTemplateTests(t, root, env)
}
func TestTests(t *testing.T) {
root := "./testData/tests"
env := tu.TestEnv(root)
tu.GlobTemplateTests(t, root, env)
}
func TestStatements(t *testing.T) {
root := "./testData/statements"
env := tu.TestEnv(root)
tu.GlobTemplateTests(t, root, env)
}
// func TestCompilationErrors(t *testing.T) {
// tu.GlobErrorTests(t, "./testData/errors/compilation")
// }
// func TestExecutionErrors(t *testing.T) {
// tu.GlobErrorTests(t, "./testData/errors/execution")
// }