diff --git a/Test.hs b/Test.hs
new file mode 100644
--- /dev/null
+++ b/Test.hs
@@ -0,0 +1,18 @@
+import Data.Geo.WKT
+import Text.Trifecta
+import Test.Tasty
+import Test.Tasty.Golden
+import System.FilePath
+
+testVsFile :: String -> TestTree
+testVsFile name =
+    goldenVsFile name expectedFile outFile run
+  where
+    expectedFile = "tests"</>name<.>"expected"
+    outFile      = "tests"</>name<.>"out"
+    run = parseFromFile projectedCS ("tests"</>name) >>= writeFile outFile . show
+
+main :: IO ()
+main = defaultMain $ testGroup "tests"
+    [ testVsFile "test.prj"
+    ]
diff --git a/src/Data/Geo/WKT/Parser.hs b/src/Data/Geo/WKT/Parser.hs
--- a/src/Data/Geo/WKT/Parser.hs
+++ b/src/Data/Geo/WKT/Parser.hs
@@ -3,29 +3,32 @@
 import Data.Geo.WKT.Types
 import Linear hiding (unit)
 import Control.Applicative
-import Control.Monad (ap)
-import Text.ParserCombinators.Parsec hiding (many)
-import Text.ParserCombinators.Parsec.Number hiding (number)
+import Control.Monad (void)
+import Text.Trifecta
 
 object :: String -> Parser a -> Parser a
 object keyword parser = do
-    string keyword
+    void $ string keyword
     between (char '[') (char ']') parser
-   
+
 quotedString :: Parser String
 quotedString = do
-    char '"'
+    void $ char '"'
     manyTill anyChar (char '"')
 
 fieldSep :: Parser ()
 fieldSep = char ',' >> spaces
 
 number :: Parser Double
-number = sign `ap` floating2 True
+number = do
+    sign <- (char '+' >> pure id) <|> (char '-' >> pure negate) <|> pure id
+    n <- double
+    return (sign n)
 
+twinAxes :: Parser (Axis, Axis)
 twinAxes = do
     ax1 <- axis
-    fieldSep 
+    fieldSep
     ax2 <- axis
     fieldSep
     return (ax1, ax2)
@@ -35,15 +38,15 @@
     name <- quotedString
     fieldSep
     conv <- number
-    auth <- optionMaybe $ fieldSep *> authority
+    auth <- optional $ fieldSep *> authority
     return $ Unit name conv auth
-    
+
 parameter :: Parser Parameter
 parameter = object "PARAMETER" $ do
     name <- quotedString
     fieldSep
     value <- number
-    return $ Parameter name value 
+    return $ Parameter name value
 
 authority :: Parser Authority
 authority = object "AUTHORITY" $ do
@@ -69,7 +72,7 @@
 projection :: Parser Projection
 projection = object "PROJECTION" $ do
     name <- quotedString
-    auth <- optionMaybe $ fieldSep *> authority
+    auth <- optional $ fieldSep *> authority
     return $ Proj name auth
 
 spheroid :: Parser Spheroid
@@ -79,16 +82,16 @@
     semiMajor <- number
     fieldSep
     invFlat <- number
-    auth <- optionMaybe $ fieldSep *> authority
+    auth <- optional $ fieldSep *> authority
     return $ Spheroid name semiMajor invFlat auth
-     
+
 datum :: Parser Datum
-datum = object "DATUM" $ do             
+datum = object "DATUM" $ do
     name <- quotedString
     fieldSep
     s <- spheroid
-    wgs <- optionMaybe $ fieldSep *> toWGS84
-    auth <- optionMaybe $ fieldSep *> authority
+    wgs <- optional $ fieldSep *> toWGS84
+    auth <- optional $ fieldSep *> authority
     return $ Datum name s wgs auth
 
 primeMeridian :: Parser PrimeMeridian
@@ -96,13 +99,13 @@
     name <- quotedString
     fieldSep
     long <- number
-    auth <- optionMaybe $ fieldSep *> authority
+    auth <- optional $ fieldSep *> authority
     return $ PrimeMeridian name long auth
-    
+
 toWGS84 :: Parser ToWGS84
 toWGS84 = object "TOWGS84" $ do
-    d <- V3 <$> number <*> number <*> number        
-    e <- V3 <$> number <*> number <*> number        
+    d <- V3 <$> number <*> number <*> number
+    e <- V3 <$> number <*> number <*> number
     ppm <- number
     return $ ToWGS84 d e ppm
 
@@ -116,10 +119,10 @@
     fieldSep
     params <- many $ parameter <* fieldSep
     linearUnit <- unit
-    axes <- optionMaybe $ fieldSep *> twinAxes
-    auth <- optionMaybe $ fieldSep *> authority
+    axes <- optional $ fieldSep *> twinAxes
+    auth <- optional $ fieldSep *> authority
     return $ ProjCS name geogcs proj params linearUnit axes auth
-    
+
 geographicCS :: Parser GeographicCS
 geographicCS = object "GEOGCS" $ do
     name <- quotedString
@@ -129,7 +132,6 @@
     primem <- primeMeridian
     fieldSep
     angularUnit <- unit
-    axes <- optionMaybe $ fieldSep *> twinAxes
-    auth <- optionMaybe $ fieldSep *> authority
+    axes <- optional $ fieldSep *> twinAxes
+    auth <- optional $ fieldSep *> authority
     return $ GeogCS name dat primem angularUnit axes auth
-    
diff --git a/wkt.cabal b/wkt.cabal
--- a/wkt.cabal
+++ b/wkt.cabal
@@ -1,5 +1,5 @@
 name:                wkt
-version:             0.2.6
+version:             0.3.0
 synopsis:            Parsec parsers and types for geographic data in well-known text (WKT) format.
 description:
   Parsec parsers and types for geographic metadata in the well-known
@@ -23,10 +23,22 @@
 library
   exposed-modules:     Data.Geo.WKT, Data.Geo.WKT.Types, Data.Geo.WKT.Parser
   other-extensions:    TemplateHaskell
-  build-depends:       base >=4.6 && <4.9,
-                       lens >=3.9 && <4.13,
-                       linear >=1.3 && <1.20,
-                       parsec >=3.1 && <3.2,
-                       parsec-numbers >=0.0 && <0.2
+  build-depends:       base >=4.6 && <4.10,
+                       lens >=3.9 && <4.14,
+                       linear >=1.3 && <1.21,
+                       trifecta >=1.5 && <1.6
   hs-source-dirs:      src
   default-language:    Haskell2010
+
+test-suite tests
+  type:                exitcode-stdio-1.0
+  main-is:             Test.hs
+  default-language:    Haskell2010
+  build-depends:       base >=4.6 && <4.10,
+                       filepath >= 1.1 && <2.0,
+                       lens >=3.9 && <4.14,
+                       linear >=1.3 && <1.21,
+                       trifecta >=1.5 && <1.6,
+                       tasty >= 0.11 && < 1.0,
+                       tasty-golden >= 2.3 && < 3.0,
+                       wkt
