Add tests for ``Data.Enumerator.Text.enumFile`` newline conversion.
diff --git a/enumerator.cabal b/enumerator.cabal
index 6bb1826..8ddcff4 100644
--- a/enumerator.cabal
+++ b/enumerator.cabal
@@ -67,6 +67,8 @@
   scripts/run-tests
   --
   tests/enumerator-tests.cabal
+  tests/data/utf8-crlf.txt
+  tests/data/utf8-lf.txt
   tests/EnumeratorTests.hs
   tests/EnumeratorTests/Binary.hs
   tests/EnumeratorTests/Binary/Consume.hs
diff --git a/tests/EnumeratorTests/Text.hs b/tests/EnumeratorTests/Text.hs
index ba366ae..7d87c6e 100644
--- a/tests/EnumeratorTests/Text.hs
+++ b/tests/EnumeratorTests/Text.hs
@@ -34,6 +34,7 @@
 	, test_ConcatMapAccumM
 	, test_Drop
 	, test_DropWhile
+	, test_EnumFile
 	, test_EnumHandle
 	, test_Filter
 	, test_FilterM
diff --git a/tests/EnumeratorTests/Text/Handle.hs b/tests/EnumeratorTests/Text/Handle.hs
index f5dd505..8a341c3 100644
--- a/tests/EnumeratorTests/Text/Handle.hs
+++ b/tests/EnumeratorTests/Text/Handle.hs
@@ -8,13 +8,17 @@
 module EnumeratorTests.Text.Handle
 	( test_EnumHandle
 	, test_IterHandle
+	, test_EnumFile
 	) where
 
 import           Test.Chell
 
 #ifdef MIN_VERSION_knob
-
 import           Data.Knob
+#endif
+
+import           Control.Monad.IO.Class (liftIO)
+import           Data.Text (Text)
 import qualified System.IO as IO
 
 import qualified Data.Enumerator as E
@@ -22,6 +26,10 @@
 import qualified Data.Enumerator.List as EL
 import qualified Data.Enumerator.Text as ET
 
+#ifdef MIN_VERSION_knob
+
+import           Paths_enumerator_tests (getDataFileName)
+
 test_EnumHandle :: Suite
 test_EnumHandle = assertions "enumHandle" $ do
 	do
@@ -54,3 +62,42 @@
 test_IterHandle = todo "iterHandle"
 
 #endif
+
+lines_LF :: [Text]
+lines_LF =
+	[ "hello world\n"
+	, "\n"
+	, "\20320\22909\19990\30028\n"
+	, "\n"
+	, "\1605\1585\1581\1576\1575 \1575\1604\1593\1575\1604\1605\n"
+	, "\n"
+	, "\12371\12435\12395\12385\12399\19990\30028\n"
+	, "\n"
+	, "\2997\2979\2965\3021\2965\2990\3021\n"
+	]
+
+lines_CRLF :: [Text]
+lines_CRLF =
+	[ "hello world\r\n"
+	, "\r\n"
+	, "\20320\22909\19990\30028\r\n"
+	, "\r\n"
+	, "\1605\1585\1581\1576\1575 \1575\1604\1593\1575\1604\1605\r\n"
+	, "\r\n"
+	, "\12371\12435\12395\12385\12399\19990\30028\r\n"
+	, "\r\n"
+	, "\2997\2979\2965\3021\2965\2990\3021\r\n"
+	]
+
+test_EnumFile :: Suite
+test_EnumFile = assertions "enumFile" $ do
+	do
+		path <- liftIO (getDataFileName "data/utf8-lf.txt")
+		chunks <- liftIO (E.run_ (ET.enumFile path $$ EL.consume))
+		$expect (equal chunks lines_LF)
+	do
+		path <- liftIO (getDataFileName "data/utf8-crlf.txt")
+		chunks <- liftIO (E.run_ (ET.enumFile path $$ EL.consume))
+		$expect (equal chunks (case IO.nativeNewline of
+			IO.LF -> lines_CRLF
+			IO.CRLF -> lines_LF))
diff --git a/tests/data/utf8-crlf.txt b/tests/data/utf8-crlf.txt
new file mode 100644
index 0000000..91e2a6d
--- /dev/null
+++ b/tests/data/utf8-crlf.txt
@@ -0,0 +1,9 @@
+hello world

+

+你好世界

+

+مرحبا العالم

+

+こんにちは世界

+

+வணக்கம்

diff --git a/tests/data/utf8-lf.txt b/tests/data/utf8-lf.txt
new file mode 100644
index 0000000..70a78e0
--- /dev/null
+++ b/tests/data/utf8-lf.txt
@@ -0,0 +1,9 @@
+hello world
+
+你好世界
+
+مرحبا العالم
+
+こんにちは世界
+
+வணக்கம்
diff --git a/tests/enumerator-tests.cabal b/tests/enumerator-tests.cabal
index 9e5bfb1..63d5665 100644
--- a/tests/enumerator-tests.cabal
+++ b/tests/enumerator-tests.cabal
@@ -3,6 +3,10 @@
 build-type: Simple
 cabal-version: >= 1.6
 
+data-files:
+  data/utf8-crlf.txt
+  data/utf8-lf.txt
+
 flag coverage
   default: False
   manual: True