summaryrefslogtreecommitdiff
path: root/android_shared_stub_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'android_shared_stub_test.go')
-rw-r--r--android_shared_stub_test.go51
1 files changed, 0 insertions, 51 deletions
diff --git a/android_shared_stub_test.go b/android_shared_stub_test.go
deleted file mode 100644
index 7b42b3a..0000000
--- a/android_shared_stub_test.go
+++ /dev/null
@@ -1,51 +0,0 @@
-//go:build !android
-
-package main
-
-import "testing"
-
-func TestReadSharedFromCacheStub(t *testing.T) {
- txt, err := readSharedFromCache()
- if err != nil {
- t.Fatalf("stub returned error: %v", err)
- }
- if txt != "" {
- t.Errorf("stub returned non-empty text: %q", txt)
- }
-}
-
-func TestHandleSharedTextLoadAutoLogSkipsEmptyStubText(t *testing.T) {
- var clearCalls int
-
- handleSharedTextLoad(
- "",
- true,
- t.TempDir(),
- func(string) {
- t.Fatal("prefill should not be called for empty shared text")
- },
- func() {
- t.Fatal("focus should not be called for empty shared text")
- },
- func() {
- t.Fatal("resetInput should not be called for empty shared text")
- },
- func() {
- clearCalls++
- },
- func(string, string) error {
- t.Fatal("logEntry should not be called for empty shared text")
- return nil
- },
- func(string, string) {
- t.Fatal("info dialog should not be shown for empty shared text")
- },
- func(error) {
- t.Fatal("error dialog should not be shown for empty shared text")
- },
- )
-
- if clearCalls != 1 {
- t.Fatalf("expected cache cleanup once, got %d", clearCalls)
- }
-}