Преглед на файлове

Add test for IsTextFile()

tags/v1.0.0
Matthias Loibl преди 7 години
родител
ревизия
e74868a850
No account linked to committer's email address
променени са 1 файла, в които са добавени 7 реда и са изтрити 3 реда
  1. 7
    3
      modules/base/tool_test.go

+ 7
- 3
modules/base/tool_test.go Целия файл

@@ -176,6 +176,10 @@ func TestIsLetter(t *testing.T) {
assert.False(t, IsLetter('$'))
}

// TODO: IsTextFile()
// TODO: IsImageFile()
// TODO: IsPDFFile()
func TestIsTextFile(t *testing.T) {
assert.True(t, IsTextFile([]byte{}))
assert.True(t, IsTextFile([]byte("lorem ipsum")))
}

// TODO: IsImageFile(), currently no idea how to test
// TODO: IsPDFFile(), currently no idea how to test

Loading…
Отказ
Запис