diff options
author | Daniel Milde <daniel@milde.cz> | 2024-05-31 22:45:28 +0200 |
---|---|---|
committer | Daniel Milde <daniel@milde.cz> | 2024-05-31 22:50:42 +0200 |
commit | eafd6591b70a49ed38373c3a21bb5c22ed62bb9a (patch) | |
tree | 234b358df05b25dc9550f2ce0b4e191ed5ff52aa | |
parent | c66dcde41e78c7784507736e65a062ac66c51530 (diff) |
test: EOF
-rw-r--r-- | tui/show_file_test.go | 6 |
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) |