瀏覽代碼

Add test for IsTextFile()

tags/v1.0.0
Matthias Loibl 7 年之前
父節點
當前提交
e74868a850
沒有連結到貢獻者的電子郵件帳戶。
共有 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…
取消
儲存