summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/hashicorp/hcl/hcl_test.go
blob: 31dff7c9e5980215640f2ec144512edf5b83bd4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package hcl

import (
	"io/ioutil"
	"path/filepath"
	"testing"
)

// This is the directory where our test fixtures are.
const fixtureDir = "./test-fixtures"

func testReadFile(t *testing.T, n string) string {
	d, err := ioutil.ReadFile(filepath.Join(fixtureDir, n))
	if err != nil {
		t.Fatalf("err: %s", err)
	}

	return string(d)
}