diff options
Diffstat (limited to 'internal/config/load_test.go')
| -rw-r--r-- | internal/config/load_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/config/load_test.go b/internal/config/load_test.go index be72fc0..1cc3ac9 100644 --- a/internal/config/load_test.go +++ b/internal/config/load_test.go @@ -104,3 +104,14 @@ func TestDefaultFileAndLogFile(t *testing.T) { t.Errorf("LogFile() = %q", got) } } + +func TestLockFile(t *testing.T) { + h := t.TempDir() + t.Setenv("HOME", h) + t.Setenv("XDG_STATE_HOME", "") + c := &Config{} + want := filepath.Join(h, ".local", "state", "krino", "dl.lock") + if got := c.LockFile("dl"); got != want { + t.Errorf("LockFile = %q, want %q", got, want) + } +} |
