From eafd6591b70a49ed38373c3a21bb5c22ed62bb9a Mon Sep 17 00:00:00 2001 From: Daniel Milde Date: Fri, 31 May 2024 22:45:28 +0200 Subject: [PATCH] test: EOF --- tui/show_file_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tui/show_file_test.go b/tui/show_file_test.go index 2958202ea..6cc87ebae 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)