...

Source file src/github.com/hashicorp/hcl/hcl_test.go

Documentation: github.com/hashicorp/hcl

     1  package hcl
     2  
     3  import (
     4  	"io/ioutil"
     5  	"path/filepath"
     6  	"testing"
     7  )
     8  
     9  // This is the directory where our test fixtures are.
    10  const fixtureDir = "./test-fixtures"
    11  
    12  func testReadFile(t *testing.T, n string) string {
    13  	d, err := ioutil.ReadFile(filepath.Join(fixtureDir, n))
    14  	if err != nil {
    15  		t.Fatalf("err: %s", err)
    16  	}
    17  
    18  	return string(d)
    19  }
    20  

View as plain text