Reset master to testing content

This commit is contained in:
Storm Dragon committed 2026-10-25 01:57:54 -04:00
1 parent 0f2587b719
commit 42afa2a56c
1483 files changed
+145308 -938069

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
package app
import (
"context"
"os"
"os/exec"
"testing"
"time"
)
func TestNativeOCRClipboardCopy(t *testing.T) {
if os.Getenv("CTHULHU_NATIVE_OCR_COPY") != "1" {
t.Skip("requires a private X11 display and xclip")
}
ctx, cancel := context.WithTimeout(context.Background(), 4*time.Second)
defer cancel()
want := "é猫 OCR\nsecond line"
if err := (xclipOCRCopier{}).Copy(ctx, want); err != nil {
t.Fatal(err)
}
got, err := exec.CommandContext(ctx, "xclip", "-selection", "clipboard", "-out").Output()
if err != nil {
t.Fatal(err)
}
if string(got) != want {
t.Fatalf("clipboard = %q, want %q", got, want)
}
}