Compare commits
5 Commits
73bee543f5
...
f0886633f8
Author | SHA1 | Date | |
---|---|---|---|
Jonathan Lamothe | f0886633f8 | ||
Jonathan Lamothe | 0db09b0420 | ||
Jonathan Lamothe | f62dd46f82 | ||
Jonathan Lamothe | 925f887af1 | ||
Jonathan Lamothe | d0a1ec6774 |
|
@ -1,3 +1,5 @@
|
||||||
# Changelog for subfix
|
# Changelog for subfix
|
||||||
|
|
||||||
## Unreleased changes
|
## 0.1.0.1
|
||||||
|
|
||||||
|
- Updated to current LTS
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
name: subfix
|
name: subfix
|
||||||
version: 0.1.0
|
version: 0.1.0.1
|
||||||
github: "jlamothe/subfix"
|
|
||||||
license: GPL-3
|
license: GPL-3
|
||||||
author: "Jonathan Lamothe"
|
author: "Jonathan Lamothe"
|
||||||
maintainer: "jonathan@jlamothe.net"
|
maintainer: "jonathan@jlamothe.net"
|
||||||
copyright: "Jonathan Lamothe"
|
copyright: "Jonathan Lamothe"
|
||||||
|
homepage: "https://git.fingerprintsoftware.ca/jlamothe/subfix"
|
||||||
|
|
||||||
extra-source-files:
|
extra-source-files:
|
||||||
- README.md
|
- README.md
|
||||||
|
@ -21,7 +21,6 @@ description: Please see the README on GitHub at <https://github.com/jlam
|
||||||
|
|
||||||
ghc-options:
|
ghc-options:
|
||||||
- -Wall
|
- -Wall
|
||||||
- -Werror
|
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- base >= 4.7 && < 5
|
- base >= 4.7 && < 5
|
||||||
|
@ -52,4 +51,4 @@ tests:
|
||||||
- -with-rtsopts=-N
|
- -with-rtsopts=-N
|
||||||
dependencies:
|
dependencies:
|
||||||
- subfix
|
- subfix
|
||||||
- hspec >=2.7.4 && <2.8
|
- hspec >=2.9.7 && <2.10
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
#
|
#
|
||||||
# resolver: ./custom-snapshot.yaml
|
# resolver: ./custom-snapshot.yaml
|
||||||
# resolver: https://example.com/snapshots/2018-01-01.yaml
|
# resolver: https://example.com/snapshots/2018-01-01.yaml
|
||||||
resolver:
|
resolver: lts-20.13
|
||||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/20.yaml
|
|
||||||
|
|
||||||
# User packages to be built.
|
# User packages to be built.
|
||||||
# Various formats can be used as shown in the example below.
|
# Various formats can be used as shown in the example below.
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
packages: []
|
packages: []
|
||||||
snapshots:
|
snapshots:
|
||||||
- completed:
|
- completed:
|
||||||
size: 532177
|
sha256: b37c0abab16c7de352c45b85f8ecc8530b084209a2c42987a96c92b4a5e3cd65
|
||||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/20.yaml
|
size: 648924
|
||||||
sha256: 0e14ba5603f01e8496e8984fd84b545a012ca723f51a098c6c9d3694e404dc6d
|
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/13.yaml
|
||||||
original:
|
original: lts-20.13
|
||||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/20.yaml
|
|
||||||
|
|
21
subfix.cabal
21
subfix.cabal
|
@ -1,18 +1,15 @@
|
||||||
cabal-version: 1.12
|
cabal-version: 1.12
|
||||||
|
|
||||||
-- This file has been generated from package.yaml by hpack version 0.33.0.
|
-- This file has been generated from package.yaml by hpack version 0.35.1.
|
||||||
--
|
--
|
||||||
-- see: https://github.com/sol/hpack
|
-- see: https://github.com/sol/hpack
|
||||||
--
|
|
||||||
-- hash: ba775360fd43dcdbf4bd590f4ac7b236109f33b1dabbda11cde0436d35d1399f
|
|
||||||
|
|
||||||
name: subfix
|
name: subfix
|
||||||
version: 0.1.0
|
version: 0.1.0.1
|
||||||
synopsis: Fixes .srt files
|
synopsis: Fixes .srt files
|
||||||
description: Please see the README on GitHub at <https://github.com/jlamothe/subfix#readme>
|
description: Please see the README on GitHub at <https://github.com/jlamothe/subfix#readme>
|
||||||
category: Utilities
|
category: Utilities
|
||||||
homepage: https://github.com/jlamothe/subfix#readme
|
homepage: https://git.fingerprintsoftware.ca/jlamothe/subfix
|
||||||
bug-reports: https://github.com/jlamothe/subfix/issues
|
|
||||||
author: Jonathan Lamothe
|
author: Jonathan Lamothe
|
||||||
maintainer: jonathan@jlamothe.net
|
maintainer: jonathan@jlamothe.net
|
||||||
copyright: Jonathan Lamothe
|
copyright: Jonathan Lamothe
|
||||||
|
@ -23,10 +20,6 @@ extra-source-files:
|
||||||
README.md
|
README.md
|
||||||
ChangeLog.md
|
ChangeLog.md
|
||||||
|
|
||||||
source-repository head
|
|
||||||
type: git
|
|
||||||
location: https://github.com/jlamothe/subfix
|
|
||||||
|
|
||||||
library
|
library
|
||||||
exposed-modules:
|
exposed-modules:
|
||||||
SubFix
|
SubFix
|
||||||
|
@ -35,7 +28,7 @@ library
|
||||||
Paths_subfix
|
Paths_subfix
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
src
|
src
|
||||||
ghc-options: -Wall -Werror
|
ghc-options: -Wall
|
||||||
build-depends:
|
build-depends:
|
||||||
base >=4.7 && <5
|
base >=4.7 && <5
|
||||||
, transformers >=0.5.6.2 && <0.6
|
, transformers >=0.5.6.2 && <0.6
|
||||||
|
@ -47,7 +40,7 @@ executable subfix
|
||||||
Paths_subfix
|
Paths_subfix
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
app
|
app
|
||||||
ghc-options: -Wall -Werror -threaded -rtsopts -with-rtsopts=-N
|
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
|
||||||
build-depends:
|
build-depends:
|
||||||
base >=4.7 && <5
|
base >=4.7 && <5
|
||||||
, subfix
|
, subfix
|
||||||
|
@ -68,9 +61,9 @@ test-suite subfix-test
|
||||||
Paths_subfix
|
Paths_subfix
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
test
|
test
|
||||||
ghc-options: -Wall -Werror -threaded -rtsopts -with-rtsopts=-N
|
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
|
||||||
build-depends:
|
build-depends:
|
||||||
base >=4.7 && <5
|
base >=4.7 && <5
|
||||||
, hspec >=2.7.4 && <2.8
|
, hspec >=2.9.7 && <2.10
|
||||||
, subfix
|
, subfix
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
|
@ -20,6 +20,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
module SubFix.DecodeSpec (spec) where
|
module SubFix.DecodeSpec (spec) where
|
||||||
|
|
||||||
|
import Data.Either (fromRight, fromLeft)
|
||||||
import Test.Hspec (Spec, context, describe, it, shouldBe)
|
import Test.Hspec (Spec, context, describe, it, shouldBe)
|
||||||
|
|
||||||
import SubFix (Caption (..), decode)
|
import SubFix (Caption (..), decode)
|
||||||
|
@ -30,7 +31,7 @@ spec = describe "decode" $ do
|
||||||
context "valid inputs" $ mapM_
|
context "valid inputs" $ mapM_
|
||||||
( \(label, input, expected) ->
|
( \(label, input, expected) ->
|
||||||
context label $ do
|
context label $ do
|
||||||
let Right results = decode input
|
let results = fromRight (error "Left") $ decode input
|
||||||
|
|
||||||
context "number of results" $ let
|
context "number of results" $ let
|
||||||
rlen = length results
|
rlen = length results
|
||||||
|
@ -57,7 +58,7 @@ spec = describe "decode" $ do
|
||||||
context "invalid inputs" $ mapM_
|
context "invalid inputs" $ mapM_
|
||||||
( \(label, input, expected) ->
|
( \(label, input, expected) ->
|
||||||
context label $ let
|
context label $ let
|
||||||
Left result = decode input
|
result = fromLeft (error "Right") $ decode input
|
||||||
in it ("should be: " ++ expected) $
|
in it ("should be: " ++ expected) $
|
||||||
result `shouldBe` expected
|
result `shouldBe` expected
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user