File: tmpdir_test.go

package info (click to toggle)
golang-github-miekg-dns 1.1.68-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid
  • size: 1,260 kB
  • sloc: makefile: 3
file content (16 lines) | stat: -rw-r--r-- 350 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//go:build !darwin

package dns

import (
	"path/filepath"
	"testing"
)

// tempDir creates a temporary directory for tests and returns a file path as
// a result of concatenation of said temporary directory path and provided filename.
func tempFile(t *testing.T, filename string) string {
	t.Helper()

	return filepath.Join(t.TempDir(), filename)
}