diff --git a/argon.cabal b/argon.cabal
--- a/argon.cabal
+++ b/argon.cabal
@@ -1,5 +1,5 @@
 name:                argon
-version:             0.3.1.0
+version:             0.3.1.1
 synopsis:            Measure your code's complexity
 homepage:            http://github.com/rubik/argon
 bug-reports:         http://github.com/rubik/argon/issues
@@ -23,6 +23,7 @@
     README.md
     CHANGELOG.md
     USAGE.txt
+    test/data/*.hs
 tested-with: GHC >= 7.8
 
 library
diff --git a/src/Argon/Preprocess.hs b/src/Argon/Preprocess.hs
--- a/src/Argon/Preprocess.hs
+++ b/src/Argon/Preprocess.hs
@@ -1,3 +1,5 @@
+-- The following code is taken from ghc-exactprint, because adding a dependency
+-- for just one module seemed excessive.
 {-# LANGUAGE CPP #-}
 {-# LANGUAGE RecordWildCards #-}
 -- | This module provides support for CPP and interpreter directives.
diff --git a/test/data/andop.hs b/test/data/andop.hs
new file mode 100644
--- /dev/null
+++ b/test/data/andop.hs
@@ -0,0 +1,1 @@
+g n = n < 68 && n `mod` 3 == 2 && n > 49
diff --git a/test/data/case.hs b/test/data/case.hs
new file mode 100644
--- /dev/null
+++ b/test/data/case.hs
@@ -0,0 +1,4 @@
+func n = case n of
+           2 -> 3
+           4 -> 6
+           _ -> 42
diff --git a/test/data/cpp-error.hs b/test/data/cpp-error.hs
new file mode 100644
--- /dev/null
+++ b/test/data/cpp-error.hs
@@ -0,0 +1,5 @@
+{-# LANGUAGE CPP #-}
+#if 0
+f = 3
+#else
+f m n = 2
diff --git a/test/data/cpp.hs b/test/data/cpp.hs
new file mode 100644
--- /dev/null
+++ b/test/data/cpp.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE CPP #-}
+#if 0
+f = 3
+#else
+f m n = case 2*n of
+          3 -> if m == 4 || m - n < 0 then 32 else 42
+          _ -> 41
+#endif
diff --git a/test/data/ifthenelse.hs b/test/data/ifthenelse.hs
new file mode 100644
--- /dev/null
+++ b/test/data/ifthenelse.hs
@@ -0,0 +1,1 @@
+f n = if n == 4 then 24 else 20
diff --git a/test/data/lambdacase.hs b/test/data/lambdacase.hs
new file mode 100644
--- /dev/null
+++ b/test/data/lambdacase.hs
@@ -0,0 +1,5 @@
+{-# LANGUAGE LambdaCase #-}
+g = \case
+       3 -> 4
+       2 -> 5
+       _ -> 6
diff --git a/test/data/multiif.hs b/test/data/multiif.hs
new file mode 100644
--- /dev/null
+++ b/test/data/multiif.hs
@@ -0,0 +1,5 @@
+{-# LANGUAGE MultiWayIf #-}
+f n = if | n `mod` 34 == 0 -> 3
+         | n `div` 24 == 1 -> 24
+         | n + 42 - 4 == 0 -> 2424
+         | _               -> 42
diff --git a/test/data/orop.hs b/test/data/orop.hs
new file mode 100644
--- /dev/null
+++ b/test/data/orop.hs
@@ -0,0 +1,1 @@
+g n = n == 2 || n == 49 || n == 2489
diff --git a/test/data/stack-setup.hs b/test/data/stack-setup.hs
new file mode 100644
--- /dev/null
+++ b/test/data/stack-setup.hs
@@ -0,0 +1,118 @@
+{-# LANGUAGE TemplateHaskell #-}
+-- Real example taken from Stack's source code (Setup.hs)
+ensureCompiler sopts = do
+    let wc = whichCompiler (soptsWantedCompiler sopts)
+    when (getGhcVersion (soptsWantedCompiler sopts) < $(mkVersion "7.8")) $ do
+        $logWarn "stack will almost certainly fail with GHC below version 7.8"
+        $logWarn "Valiantly attempting to run anyway, but I know this is doomed"
+        $logWarn "For more information, see: https://github.com/commercialhaskell/stack/issues/648"
+        $logWarn ""
+
+    -- Check the available GHCs
+    menv0 <- getMinimalEnvOverride
+
+    msystem <-
+        if soptsUseSystem sopts
+            then getSystemCompiler menv0 wc
+            else return Nothing
+
+    Platform expectedArch _ <- asks getPlatform
+
+    let needLocal = case msystem of
+            Nothing -> True
+            Just _ | soptsSkipGhcCheck sopts -> False
+            Just (system, arch) ->
+                not (isWanted system) ||
+                arch /= expectedArch
+        isWanted = isWantedCompiler (soptsCompilerCheck sopts) (soptsWantedCompiler sopts)
+
+    -- If we need to install a GHC, try to do so
+    mtools <- if needLocal
+        then do
+            getSetupInfo' <- runOnce (getSetupInfo (soptsStackSetupYaml sopts) =<< asks getHttpManager)
+
+            localPrograms <- asks $ configLocalPrograms . getConfig
+            installed <- listInstalled localPrograms
+
+            -- Install GHC
+            ghcVariant <- asks getGHCVariant
+            config <- asks getConfig
+            ghcPkgName <- parsePackageNameFromString ("ghc" ++ ghcVariantSuffix ghcVariant)
+            let installedCompiler =
+                    case wc of
+                        Ghc -> getInstalledTool installed ghcPkgName (isWanted . GhcVersion)
+                        Ghcjs -> getInstalledGhcjs installed isWanted
+            compilerTool <- case installedCompiler of
+                Just tool -> return tool
+                Nothing
+                    | soptsInstallIfMissing sopts -> do
+                        si <- getSetupInfo'
+                        downloadAndInstallCompiler
+                            si
+                            (soptsWantedCompiler sopts)
+                            (soptsCompilerCheck sopts)
+                            (soptsGHCBindistURL sopts)
+                    | otherwise -> do
+                        throwM $ CompilerVersionMismatch
+                            msystem
+                            (soptsWantedCompiler sopts, expectedArch)
+                            ghcVariant
+                            (soptsCompilerCheck sopts)
+                            (soptsStackYaml sopts)
+                            (fromMaybe
+                                ("Try running \"stack setup\" to install the correct GHC into "
+                                <> T.pack (toFilePath (configLocalPrograms config)))
+                                $ soptsResolveMissingGHC sopts)
+
+            -- Install msys2 on windows, if necessary
+            platform <- asks getPlatform
+            mmsys2Tool <- case platform of
+                Platform _ Cabal.Windows | not (soptsSkipMsys sopts) ->
+                    case getInstalledTool installed $(mkPackageName "msys2") (const True) of
+                        Just tool -> return (Just tool)
+                        Nothing
+                            | soptsInstallIfMissing sopts -> do
+                                si <- getSetupInfo'
+                                osKey <- getOSKey platform
+                                VersionedDownloadInfo version info <-
+                                    case Map.lookup osKey $ siMsys2 si of
+                                        Just x -> return x
+                                        Nothing -> error $ "MSYS2 not found for " ++ T.unpack osKey
+                                let tool = Tool (PackageIdentifier $(mkPackageName "msys2") version)
+                                Just <$> downloadAndInstallTool (configLocalPrograms config) si info tool (installMsys2Windows osKey)
+                            | otherwise -> do
+                                $logWarn "Continuing despite missing tool: msys2"
+                                return Nothing
+                _ -> return Nothing
+
+            return $ Just (compilerTool, mmsys2Tool)
+        else return Nothing
+
+    mpaths <- case mtools of
+        Nothing -> return Nothing
+        Just (compilerTool, mmsys2Tool) -> do
+            let idents = catMaybes [Just compilerTool, mmsys2Tool]
+            paths <- mapM extraDirs idents
+            return $ Just $ mconcat paths
+
+    menv <-
+        case mpaths of
+            Nothing -> return menv0
+            Just ed -> do
+                config <- asks getConfig
+                let m = augmentPathMap (edBins ed) (unEnvOverride menv0)
+                mkEnvOverride (configPlatform config) (removeHaskellEnvVars m)
+
+    when (soptsUpgradeCabal sopts) $ do
+        unless needLocal $ do
+            $logWarn "Trying to upgrade Cabal library on a GHC not installed by stack."
+            $logWarn "This may fail, caveat emptor!"
+        upgradeCabal menv wc
+
+    case mtools of
+        Just (ToolGhcjs cv, _) -> ensureGhcjsBooted menv cv (soptsInstallIfMissing sopts)
+        _ -> return ()
+
+    when (soptsSanityCheck sopts) $ sanityCheck menv wc
+
+    return mpaths
diff --git a/test/data/syntaxerror.hs b/test/data/syntaxerror.hs
new file mode 100644
--- /dev/null
+++ b/test/data/syntaxerror.hs
@@ -0,0 +1,1 @@
+g n = 2 +
