hcl/hcl_test.go

20 lines
334 B
Go
Raw Normal View History

2014-08-02 22:44:45 +00:00
package hcl
import (
"io/ioutil"
"path/filepath"
"testing"
)
2014-08-02 22:44:45 +00:00
// 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)
}