ソースを参照

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

読み込み中…
キャンセル
保存