feat: native clipboard image sync (Linux, opt-in sync_images)
This commit is contained in:
@@ -69,6 +69,22 @@ func TestShouldAcceptNewContent(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestShouldIgnoreDuplicateImageHash(t *testing.T) {
|
||||
f := NewFilter("machine-a")
|
||||
f.MarkWrittenPayload(Payload{Mime: "image/png", Data: "aGVsbG8="})
|
||||
|
||||
p := Payload{
|
||||
Mime: "image/png",
|
||||
Data: "aGVsbG8=",
|
||||
Ts: time.Now().UnixNano(),
|
||||
Origin: "machine-b",
|
||||
}
|
||||
|
||||
if !f.ShouldIgnore(p) {
|
||||
t.Error("should ignore image payload with recently written data hash")
|
||||
}
|
||||
}
|
||||
|
||||
func TestCacheEviction(t *testing.T) {
|
||||
f := NewFilter("machine-a")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user