Browse Source

Add test for IsTextFile()

tags/v1.21.12.1
Matthias Loibl 9 years ago
parent
commit
e74868a850
No known key found for this signature in database GPG Key ID: B1C7DF661ABB2C1A
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      modules/base/tool_test.go

+ 7
- 3
modules/base/tool_test.go View File

@@ -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…
Cancel
Save