diff --git a/conduit.cabal b/conduit.cabal
--- a/conduit.cabal
+++ b/conduit.cabal
@@ -1,5 +1,5 @@
 Name:                conduit
-Version:             0.5.4.1
+Version:             0.5.4.2
 Synopsis:            Streaming data processing library.
 Description:
     @conduit@ is a solution to the streaming data problem, allowing for production, transformation, and consumption of streams of data in constant memory. It is an alternative to lazy I\/O which guarantees deterministic resource handling, and fits in the same general solution space as @enumerator@/@iteratee@ and @pipes@. For a brief tutorial, please see the "Data.Conduit" module.
@@ -80,6 +80,13 @@
                    , resourcet
                    , void
     ghc-options:     -Wall
+
+test-suite doctests
+    hs-source-dirs: test
+    main-is: doctests.hs
+    type: exitcode-stdio-1.0
+    ghc-options: -threaded
+    build-depends: base, directory, doctest >= 0.8
 
 source-repository head
   type:     git
diff --git a/test/doctests.hs b/test/doctests.hs
new file mode 100644
--- /dev/null
+++ b/test/doctests.hs
@@ -0,0 +1,11 @@
+module Main where
+
+import System.Directory
+import Test.DocTest
+
+main :: IO ()
+main = do
+  writeFile "input.txt" "some dummy content"
+  doctest ["Data/Conduit.hs"]
+  removeFile "input.txt"
+  removeFile "output.txt"
