summaryrefslogtreecommitdiff
path: root/internal/tests/integration/docs_examples_test.go
blob: 87f866ff1568e8ab2786477702bab8300c65dd71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package integration

import (
	"testing"
)

// This file contains integration tests to make sure that (some of) the examples
// in the gomplate docs work correctly

func TestDocsExamples_DataExamples(t *testing.T) {
	inOutTest(t,
		"{{ $rows := (jsonArray `[[\"first\",\"second\"],[\"1\",\"2\"],[\"3\",\"4\"]]`) }}{{ data.ToCSV \";\" $rows }}",
		"first;second\r\n1;2\r\n3;4\r\n")
}