File: integration_test.go

package info (click to toggle)
golang-github-valyala-quicktemplate 1.8.0%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 492 kB
  • sloc: makefile: 16; xml: 15
file content (19 lines) | stat: -rw-r--r-- 416 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package tests

import (
	"io/ioutil"
	"testing"

	"github.com/valyala/quicktemplate/testdata/templates"
)

func TestIntegration(t *testing.T) {
	expectedS, err := ioutil.ReadFile("../testdata/templates/integration.qtpl.out")
	if err != nil {
		t.Fatalf("unexpected error: %s", err)
	}
	s := templates.Integration()
	if s != string(expectedS) {
		t.Fatalf("unexpected output\n%q\nExpecting\n%q\n", s, expectedS)
	}
}