19 lines
396 B
Go
19 lines
396 B
Go
//go:build windows
|
|
|
|
package spool
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
func TestEnsurePrivateFileAcceptsExistingPrivateFile(t *testing.T) {
|
|
path := filepath.Join(t.TempDir(), "spool.lock")
|
|
if err := ensurePrivateFile(path); err != nil {
|
|
t.Fatalf("create private file: %v", err)
|
|
}
|
|
if err := ensurePrivateFile(path); err != nil {
|
|
t.Fatalf("recheck existing private file: %v", err)
|
|
}
|
|
}
|