Skip to content

Commit e74868a

Browse files
committed
Add test for IsTextFile()
1 parent 95d4cd9 commit e74868a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

modules/base/tool_test.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ func TestIsLetter(t *testing.T) {
176176
assert.False(t, IsLetter('$'))
177177
}
178178

179-
// TODO: IsTextFile()
180-
// TODO: IsImageFile()
181-
// TODO: IsPDFFile()
179+
func TestIsTextFile(t *testing.T) {
180+
assert.True(t, IsTextFile([]byte{}))
181+
assert.True(t, IsTextFile([]byte("lorem ipsum")))
182+
}
183+
184+
// TODO: IsImageFile(), currently no idea how to test
185+
// TODO: IsPDFFile(), currently no idea how to test

0 commit comments

Comments
 (0)