File: hcl_test.go

package info (click to toggle)
golang-github-hashicorp-hcl 1.0.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-backports, bookworm-proposed-updates, bullseye, bullseye-backports, experimental, sid, trixie
  • size: 1,028 kB
  • sloc: makefile: 22
file content (19 lines) | stat: -rw-r--r-- 334 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 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)
}