lentil 1.0.9.0 → 1.0.9.1
raw patch · 6 files changed
+61/−8 lines, 6 filesdep ~optparse-applicative
Dependency ranges changed: optparse-applicative
Files
- changes.txt +7/−0
- lentil.cabal +7/−5
- src/Lentil/Helpers.hs +0/−1
- src/Main.hs +1/−1
- stack.yaml +1/−1
- test/Lentil/HelpersSpec.hs +45/−0
changes.txt view
@@ -1,3 +1,10 @@+1.0.9.1+-------++- Released Tue 12 Dec 2017 14:33:01 CET+- Released constraints and updated stack.yaml (Luke Murphy)+- Minor typos fix+ 1.0.9.0 -------
lentil.cabal view
@@ -1,5 +1,5 @@ name: lentil-version: 1.0.9.0+version: 1.0.9.1 synopsis: frugal issue tracker description: minumum effort, cohesive issue tracker based on ubiquitous @TODO@s and @FIXME@s conventions.@@ -13,7 +13,7 @@ category: Development stability: Stable build-type: Simple-tested-with: GHC==7.8.4, GHC==8.0.1+tested-with: GHC==7.8.4, GHC==8.0.1, GHC==8.2.2 extra-source-files: stack.yaml, test/test-files/lang-comm/clang.c, test/test-files/lang-comm/haskell.hs,@@ -60,7 +60,8 @@ directory >= 1.2 && < 1.4, transformers >= 0.3 && < 0.6, pipes >= 4.2 && < 4.4,- optparse-applicative==0.13.*, regex-tdfa==1.2.*,+ optparse-applicative >= 0.13 && < 0.15,+ regex-tdfa==1.2.*, natural-sort==0.1.*, parsec==3.1.*, filepath==1.4.*, filemanip==0.3.*, ansi-wl-pprint==0.6.*, csv==0.1.*, terminal-progress-bar==0.1.*,@@ -88,7 +89,8 @@ directory >= 1.2 && < 1.4, transformers >= 0.3 && < 0.6, pipes >= 4.2 && < 4.4,- optparse-applicative==0.13.*, regex-tdfa==1.2.*,+ optparse-applicative >= 0.13 && < 0.15,+ regex-tdfa==1.2.*, natural-sort==0.1.*, parsec==3.1.*, filepath==1.4.*, filemanip==0.3.*, ansi-wl-pprint==0.6.*, csv==0.1.*, terminal-progress-bar==0.1.*, text==1.2.*,@@ -98,7 +100,7 @@ other-modules: Lentil.Types, Lentil.Args, Lentil.File, Lentil.Print, Lentil.Query, Lentil.Export, Lentil.Parse.Source, Lentil.Parse.Issue, Lentil.Parse.Syntaxes,- Lentil.Parse.Run,+ Lentil.Parse.Run, Lentil.HelpersSpec Lentil.ArgsSpec, Lentil.ExportSpec, Lentil.FileSpec, Lentil.PrintSpec, Lentil.Parse.SourceSpec, Lentil.Parse.IssueSpec, Lentil.QuerySpec,
src/Lentil/Helpers.hs view
@@ -45,4 +45,3 @@ P.many P.anyChar >>= \b -> return ('.':a, '.':b) -
src/Main.hs view
@@ -29,7 +29,7 @@ short 'v' <> help "show version and copyright info" ) where- versionCopy = "\nlentil - frugal issue tracker, version 1.0.9.0\n\+ versionCopy = "\nlentil - frugal issue tracker, version 1.0.9.1\n\ \(C) 2015-2017 Francesco Ariis - http://www.ariis.it\n\ \released under the GNU General Public License v3\n"
stack.yaml view
@@ -1,3 +1,3 @@-resolver: lts-8.3+resolver: lts-9.14 packages: - '.'
+ test/Lentil/HelpersSpec.hs view
@@ -0,0 +1,45 @@+module Lentil.HelpersSpec where+++import Test.Hspec+import Text.Parsec+import Text.Parsec.String++import Lentil.Helpers++import Prelude -- 7.8 hack++-- Parsing tests++-- simple parser (choosable if we are at begin of line or else)+sp :: Parser a -> String -> Maybe a+sp p cs = either (const Nothing) Just+ (runParser p () fp cs)+ where fp = "<f>"+++main :: IO ()+main = hspec spec+++spec :: Spec+spec = do++ describe "manyTill1" $ do+ it "behaves like manyTill on non-empty string" $+ sp (manyTill1 anyChar newline) "foo\n" `shouldBe`+ sp (manyTill anyChar newline) "foo\n"+ it "fails on empty string (while manyTill does not)" $+ (sp (manyTill1 anyChar newline) "\n",+ sp (manyTill anyChar newline) "\n") `shouldBe` (Nothing,+ Just "")+ it "has the same behaviour as manyTill on 1 char w/o end char" $+ sp (manyTill1 anyChar newline) "f" `shouldBe`+ sp (manyTill anyChar newline) "f"++ describe "aliasp" $ do+ it "parses an extension alias" $+ aliasp "aaa%bc" `shouldBe` Just (".aaa", ".bc")+ it "fails on incorrect input" $+ aliasp "aaabc" `shouldBe` Nothing+