Compare commits

..

No commits in common. "f0886633f83da86c3e39a0dc8358ab81dd3796a9" and "73bee543f5a4cba17ec80ffe576a2ff72dfad83f" have entirely different histories.

6 changed files with 28 additions and 21 deletions

View File

@ -1,5 +1,3 @@
# Changelog for subfix
## 0.1.0.1
- Updated to current LTS
## Unreleased changes

View File

@ -1,10 +1,10 @@
name: subfix
version: 0.1.0.1
version: 0.1.0
github: "jlamothe/subfix"
license: GPL-3
author: "Jonathan Lamothe"
maintainer: "jonathan@jlamothe.net"
copyright: "Jonathan Lamothe"
homepage: "https://git.fingerprintsoftware.ca/jlamothe/subfix"
extra-source-files:
- README.md
@ -21,6 +21,7 @@ description: Please see the README on GitHub at <https://github.com/jlam
ghc-options:
- -Wall
- -Werror
dependencies:
- base >= 4.7 && < 5
@ -51,4 +52,4 @@ tests:
- -with-rtsopts=-N
dependencies:
- subfix
- hspec >=2.9.7 && <2.10
- hspec >=2.7.4 && <2.8

View File

@ -17,7 +17,8 @@
#
# resolver: ./custom-snapshot.yaml
# resolver: https://example.com/snapshots/2018-01-01.yaml
resolver: lts-20.13
resolver:
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/20.yaml
# User packages to be built.
# Various formats can be used as shown in the example below.

View File

@ -6,7 +6,8 @@
packages: []
snapshots:
- completed:
sha256: b37c0abab16c7de352c45b85f8ecc8530b084209a2c42987a96c92b4a5e3cd65
size: 648924
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/20/13.yaml
original: lts-20.13
size: 532177
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/20.yaml
sha256: 0e14ba5603f01e8496e8984fd84b545a012ca723f51a098c6c9d3694e404dc6d
original:
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/20.yaml

View File

@ -1,15 +1,18 @@
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.35.1.
-- This file has been generated from package.yaml by hpack version 0.33.0.
--
-- see: https://github.com/sol/hpack
--
-- hash: ba775360fd43dcdbf4bd590f4ac7b236109f33b1dabbda11cde0436d35d1399f
name: subfix
version: 0.1.0.1
version: 0.1.0
synopsis: Fixes .srt files
description: Please see the README on GitHub at <https://github.com/jlamothe/subfix#readme>
category: Utilities
homepage: https://git.fingerprintsoftware.ca/jlamothe/subfix
homepage: https://github.com/jlamothe/subfix#readme
bug-reports: https://github.com/jlamothe/subfix/issues
author: Jonathan Lamothe
maintainer: jonathan@jlamothe.net
copyright: Jonathan Lamothe
@ -20,6 +23,10 @@ extra-source-files:
README.md
ChangeLog.md
source-repository head
type: git
location: https://github.com/jlamothe/subfix
library
exposed-modules:
SubFix
@ -28,7 +35,7 @@ library
Paths_subfix
hs-source-dirs:
src
ghc-options: -Wall
ghc-options: -Wall -Werror
build-depends:
base >=4.7 && <5
, transformers >=0.5.6.2 && <0.6
@ -40,7 +47,7 @@ executable subfix
Paths_subfix
hs-source-dirs:
app
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
ghc-options: -Wall -Werror -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >=4.7 && <5
, subfix
@ -61,9 +68,9 @@ test-suite subfix-test
Paths_subfix
hs-source-dirs:
test
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
ghc-options: -Wall -Werror -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >=4.7 && <5
, hspec >=2.9.7 && <2.10
, hspec >=2.7.4 && <2.8
, subfix
default-language: Haskell2010

View File

@ -20,7 +20,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
module SubFix.DecodeSpec (spec) where
import Data.Either (fromRight, fromLeft)
import Test.Hspec (Spec, context, describe, it, shouldBe)
import SubFix (Caption (..), decode)
@ -31,7 +30,7 @@ spec = describe "decode" $ do
context "valid inputs" $ mapM_
( \(label, input, expected) ->
context label $ do
let results = fromRight (error "Left") $ decode input
let Right results = decode input
context "number of results" $ let
rlen = length results
@ -58,7 +57,7 @@ spec = describe "decode" $ do
context "invalid inputs" $ mapM_
( \(label, input, expected) ->
context label $ let
result = fromLeft (error "Right") $ decode input
Left result = decode input
in it ("should be: " ++ expected) $
result `shouldBe` expected
)