summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Milde <daniel@milde.cz>2024-05-31 22:45:28 +0200
committerDaniel Milde <daniel@milde.cz>2024-05-31 22:50:42 +0200
commiteafd6591b70a49ed38373c3a21bb5c22ed62bb9a (patch)
tree234b358df05b25dc9550f2ce0b4e191ed5ff52aa
parentc66dcde41e78c7784507736e65a062ac66c51530 (diff)
test: EOF
-rw-r--r--tui/show_file_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/tui/show_file_test.go b/tui/show_file_test.go
index 2958202..6cc87eb 100644
--- a/tui/show_file_test.go
+++ b/tui/show_file_test.go
@@ -9,6 +9,12 @@ import (
"github.com/ulikunitz/xz"
)
+func TestGetScannerForEmptyString(t *testing.T) {
+ r := bytes.NewReader([]byte{})
+ _, err := getScanner(r)
+ assert.ErrorContains(t, err, "EOF")
+}
+
func TestGetScannerForPlainString(t *testing.T) {
r := bytes.NewReader([]byte("hello"))
s, err := getScanner(r)