MCPcopy Create free account
hub / github.com/diillson/chatcli / TestFileLockManager_NormalizesPath

Function TestFileLockManager_NormalizesPath

cli/agent/workers/file_lock_test.go:95–110  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

93}
94
95func TestFileLockManager_NormalizesPath(t *testing.T) {
96 mgr := NewFileLockManager()
97
98 // Both should resolve to the same absolute path
99 mgr.Lock("./test.go")
100 // If this doesn't deadlock, the paths are correctly normalized
101 ch := make(chan struct{})
102 go func() {
103 mgr.Lock("test.go")
104 close(ch)
105 mgr.Unlock("test.go")
106 }()
107
108 mgr.Unlock("./test.go")
109 <-ch // Wait for the goroutine to acquire the lock
110}

Callers

nothing calls this directly

Calls 3

LockMethod · 0.95
UnlockMethod · 0.95
NewFileLockManagerFunction · 0.85

Tested by

no test coverage detected