summaryrefslogtreecommitdiff
path: root/internal/hexaicli/testhelpers_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/hexaicli/testhelpers_test.go')
-rw-r--r--internal/hexaicli/testhelpers_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/hexaicli/testhelpers_test.go b/internal/hexaicli/testhelpers_test.go
index 93f1e3d..4cc04f7 100644
--- a/internal/hexaicli/testhelpers_test.go
+++ b/internal/hexaicli/testhelpers_test.go
@@ -79,4 +79,14 @@ func writeTOML(t *testing.T, path string, m map[string]string) {
}
}
+func writeConfigString(t *testing.T, path string, contents string) {
+ t.Helper()
+ if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
+ t.Fatalf("mkdir: %v", err)
+ }
+ if err := os.WriteFile(path, []byte(contents), 0o644); err != nil {
+ t.Fatalf("write: %v", err)
+ }
+}
+
func testingTempDir(t *testing.T) string { t.Helper(); return t.TempDir() }