safe-coloured-text-layout 0.2.0.0 → 0.2.0.1
raw patch · 10 files changed
+7/−146 lines, 10 filesdep −bytestringdep −safe-coloured-text-layoutdep −sydtestPVP ok
version bump matches the API change (PVP)
Dependencies removed: bytestring, safe-coloured-text-layout, sydtest
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- safe-coloured-text-layout.cabal +1/−27
- test/Spec.hs +0/−1
- test/Text/Colour/LayoutSpec.hs +0/−87
- test_resources/background.dat +0/−5
- test_resources/bicolour-background.dat +0/−5
- test_resources/custom-column-separator.dat +0/−10
- test_resources/list.dat +0/−4
- test_resources/table-with-rows-of-unequal-length.dat +0/−3
- test_resources/two-columns.dat +0/−4
CHANGELOG.md view
@@ -1,5 +1,11 @@ # Changelog for safe-coloured-text-layout +## [0.2.0.1] - 2024-08-03++### Changed++* Moved the test suite to `safe-coloured-text-layout-gen`+ ## [0.2.0.0] - 2024-06-23 ### Added
safe-coloured-text-layout.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: safe-coloured-text-layout-version: 0.2.0.0+version: 0.2.0.1 synopsis: Safely layout output coloured text category: User Interfaces homepage: https://github.com/NorfairKing/safe-coloured-text#readme@@ -18,12 +18,6 @@ build-type: Simple extra-source-files: CHANGELOG.md- test_resources/background.dat- test_resources/bicolour-background.dat- test_resources/custom-column-separator.dat- test_resources/list.dat- test_resources/table-with-rows-of-unequal-length.dat- test_resources/two-columns.dat source-repository head type: git@@ -41,24 +35,4 @@ , safe-coloured-text , text , validity- default-language: Haskell2010--test-suite safe-coloured-text-layout-test- type: exitcode-stdio-1.0- main-is: Spec.hs- other-modules:- Text.Colour.LayoutSpec- Paths_safe_coloured_text_layout- hs-source-dirs:- test- ghc-options: -threaded -rtsopts -with-rtsopts=-N- build-tool-depends:- sydtest-discover:sydtest-discover- build-depends:- base >=4.7 && <5- , bytestring- , safe-coloured-text- , safe-coloured-text-layout- , sydtest- , text default-language: Haskell2010
− test/Spec.hs
@@ -1,1 +0,0 @@-{-# OPTIONS_GHC -F -pgmF sydtest-discover #-}
− test/Text/Colour/LayoutSpec.hs
@@ -1,87 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}--module Text.Colour.LayoutSpec (spec) where--import qualified Data.Text as T-import Test.Syd-import Text.Colour-import Text.Colour.Layout--spec :: Spec-spec = do- let gf = ("test_resources/" ++)- describe "layoutAsTable" $ do- it "outputs this list the same as before" $ do- pureGoldenTextFile- (gf "list.dat")- ( renderChunksText- With24BitColours- ( layoutAsTable- [ [["this"]],- [["is"]],- [["a"]],- [["list"]]- ]- )- )- it "outputs this two-column table the same as before" $ do- pureGoldenTextFile- (gf "two-columns.dat")- ( renderChunksText- With24BitColours- ( layoutAsTable- [ [["this"], ["this"]],- [["is"], ["is"]],- [["a"], ["another"]],- [["list"], ["list"]]- ]- )- )- it "outputs this weird two-column table the same as before" $ do- pureGoldenTextFile- (gf "table-with-rows-of-unequal-length.dat")- ( renderChunksText- With24BitColours- ( layoutAsTable- [ [["what"], ["the"], []],- [["is"], ["this"], [], ["-ing"], []],- [["I"], ["don't"], ["understand"], ["one"], [], ["of"], ["it"]]- ]- )- )- it "outputs this two-column table with a custom column separator the same as before" $ do- pureGoldenTextFile- (gf "custom-column-separator.dat")- ( renderChunksText- With24BitColours- ( renderTable $- ( table $ [[[chunk (T.pack (show (x + y)))] | x <- [0 :: Int .. 9]] | y <- [0 :: Int .. 9]]- )- { tableColumnSeparator = "@"- }- )- )- it "outputs this table with a background colour the same as before" $ do- pureGoldenTextFile- (gf "background.dat")- ( renderChunksText- With24BitColours- ( renderTable $- ( table $ [[[fore red $ chunk (T.pack (show (x ^ y)))] | x <- [0 :: Int .. 4]] | y <- [0 :: Int .. 4]]- )- { tableBackground = Just (SingleColour black)- }- )- )- it "outputs this table with a bicoloured background the same as before" $ do- pureGoldenTextFile- (gf "bicolour-background.dat")- ( renderChunksText- With24BitColours- ( renderTable $- ( table $ [[[fore red $ chunk (T.pack (show (x ^ y)))] | x <- [0 :: Int .. 4]] | y <- [0 :: Int .. 4]]- )- { tableBackground = Just (Bicolour (Just black) (Just brightBlack))- }- )- )
− test_resources/background.dat
@@ -1,5 +0,0 @@-[31;40m1[m[40m[m[40m [m[31;40m1[m[40m[m[40m [m[31;40m1[m[40m [m[40m [m[31;40m1[m[40m [m[40m [m[31;40m1[m[40m [m-[31;40m0[m[40m[m[40m [m[31;40m1[m[40m[m[40m [m[31;40m2[m[40m [m[40m [m[31;40m3[m[40m [m[40m [m[31;40m4[m[40m [m-[31;40m0[m[40m[m[40m [m[31;40m1[m[40m[m[40m [m[31;40m4[m[40m [m[40m [m[31;40m9[m[40m [m[40m [m[31;40m16[m[40m [m-[31;40m0[m[40m[m[40m [m[31;40m1[m[40m[m[40m [m[31;40m8[m[40m [m[40m [m[31;40m27[m[40m[m[40m [m[31;40m64[m[40m [m-[31;40m0[m[40m[m[40m [m[31;40m1[m[40m[m[40m [m[31;40m16[m[40m[m[40m [m[31;40m81[m[40m[m[40m [m[31;40m256[m[40m[m
− test_resources/bicolour-background.dat
@@ -1,5 +0,0 @@-[31;40m1[m[40m[m[40m [m[31;40m1[m[40m[m[40m [m[31;40m1[m[40m [m[40m [m[31;40m1[m[40m [m[40m [m[31;40m1[m[40m [m-[31;100m0[m[100m[m[100m [m[31;100m1[m[100m[m[100m [m[31;100m2[m[100m [m[100m [m[31;100m3[m[100m [m[100m [m[31;100m4[m[100m [m-[31;40m0[m[40m[m[40m [m[31;40m1[m[40m[m[40m [m[31;40m4[m[40m [m[40m [m[31;40m9[m[40m [m[40m [m[31;40m16[m[40m [m-[31;100m0[m[100m[m[100m [m[31;100m1[m[100m[m[100m [m[31;100m8[m[100m [m[100m [m[31;100m27[m[100m[m[100m [m[31;100m64[m[100m [m-[31;40m0[m[40m[m[40m [m[31;40m1[m[40m[m[40m [m[31;40m16[m[40m[m[40m [m[31;40m81[m[40m[m[40m [m[31;40m256[m[40m[m
− test_resources/custom-column-separator.dat
@@ -1,10 +0,0 @@-0@1 @2 @3 @4 @5 @6 @7 @8 @9 -1@2 @3 @4 @5 @6 @7 @8 @9 @10-2@3 @4 @5 @6 @7 @8 @9 @10@11-3@4 @5 @6 @7 @8 @9 @10@11@12-4@5 @6 @7 @8 @9 @10@11@12@13-5@6 @7 @8 @9 @10@11@12@13@14-6@7 @8 @9 @10@11@12@13@14@15-7@8 @9 @10@11@12@13@14@15@16-8@9 @10@11@12@13@14@15@16@17-9@10@11@12@13@14@15@16@17@18
− test_resources/list.dat
@@ -1,4 +0,0 @@-this-is -a -list
− test_resources/table-with-rows-of-unequal-length.dat
@@ -1,3 +0,0 @@-what the -is this -ing -I don't understand one of it
− test_resources/two-columns.dat
@@ -1,4 +0,0 @@-this this -is is -a another-list list