From e74868a8508eb7069c62f3cf71bbd71184985d1f Mon Sep 17 00:00:00 2001
From: Matthias Loibl <mail@matthiasloibl.com>
Date: Mon, 7 Nov 2016 23:15:02 +0100
Subject: [PATCH] Add test for IsTextFile()

---
 modules/base/tool_test.go | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/modules/base/tool_test.go b/modules/base/tool_test.go
index 4f64d3728d..093e479a38 100644
--- a/modules/base/tool_test.go
+++ b/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