packages feed

HTF 0.14.0.6 → 0.14.0.7

raw patch · 9 files changed

+58/−34 lines, 9 filesdep ~aesondep ~textPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: aeson, text

API changes (from Hackage documentation)

Files

.travis.yml view
@@ -13,10 +13,11 @@ # The different configurations we want to test. You could also do things like # change flags or use --stack-yaml to point to a different file. env:-- HTF_TRAVIS_STACK_ARGS="--stack-yaml ${TRAVIS_BUILD_DIR}/stack-ghc-8.10.yaml"-- HTF_TRAVIS_STACK_ARGS="--stack-yaml ${TRAVIS_BUILD_DIR}/stack-ghc-8.8.yaml"-- HTF_TRAVIS_STACK_ARGS="--stack-yaml ${TRAVIS_BUILD_DIR}/stack-ghc-8.6.yaml"-- HTF_TRAVIS_STACK_ARGS="--stack-yaml ${TRAVIS_BUILD_DIR}/stack-ghc-8.4.yaml"+- HTF_TEST_STACK_ARGS="--stack-yaml ${TRAVIS_BUILD_DIR}/stack-ghc-9.0.yaml"+- HTF_TEST_STACK_ARGS="--stack-yaml ${TRAVIS_BUILD_DIR}/stack-ghc-8.10.yaml"+- HTF_TEST_STACK_ARGS="--stack-yaml ${TRAVIS_BUILD_DIR}/stack-ghc-8.8.yaml"+- HTF_TEST_STACK_ARGS="--stack-yaml ${TRAVIS_BUILD_DIR}/stack-ghc-8.6.yaml"+- HTF_TEST_STACK_ARGS="--stack-yaml ${TRAVIS_BUILD_DIR}/stack-ghc-8.4.yaml"  before_install: # Download and unpack the stack executable
ChangeLog view
@@ -1,3 +1,7 @@+* 0.14.0.7 (2022-03-03)+  - several upper bounds for packages+  - minor improvements+ * 0.14.0.5 (2021-01-26)   - make sure htfpp is available before running the tests @@ -10,6 +14,7 @@  * 0.14.0.1 (2019-11-27)   - find cpphs+ * 0.14.0.0 (2019-11-26)   - support for GHC 8.8   - fix for performance problem with long strings
HTF.cabal view
@@ -1,5 +1,6 @@+Cabal-Version:    2.0 Name:             HTF-Version:          0.14.0.6+Version:          0.14.0.7 License:          LGPL-2.1 License-File:     LICENSE Copyright:        (c) 2005-2015 Stefan Wehr@@ -31,7 +32,7 @@     demonstrating HTF's coloring, pretty-printing and diff functionality.  Build-Type:       Custom-Cabal-Version:    2.0+ Extra-Source-Files:   README.md   TODO.org@@ -85,12 +86,13 @@   scripts/prepare  tested-with:-  GHC == 8.2.2-  GHC == 8.4.4-  GHC == 8.6.5+  GHC == 9.2.1+  GHC == 9.0.2+  GHC == 8.10.7   GHC == 8.8.4-  GHC == 8.10.4-  GHC == 9.0.1+  GHC == 8.6.5+  GHC == 8.4.4+  GHC == 8.2.2  Source-Repository head   Type:           git@@ -111,7 +113,7 @@                     mtl >= 1.1,                     old-time >= 1.0,                     random >= 1.0,-                    text,+                    text >= 0.11,                     HTF   Build-tool-depends: cpphs:cpphs >= 1.19   Other-Modules:@@ -179,7 +181,9 @@     Paths_HTF   Build-tool-depends: cpphs:cpphs >= 1.19   Default-language:  Haskell2010-  Ghc-Options: -W -fwarn-unused-imports -fwarn-unused-binds -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind+  Ghc-Options:+    -W -fwarn-unused-imports -fwarn-unused-binds -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind+    -Wcompat  Test-Suite MiscTests   Main-is:           MiscTest.hs@@ -198,7 +202,7 @@   Hs-Source-Dirs:    tests, tests/real-bbt   Type:              exitcode-stdio-1.0   Build-depends:     HTF,-                     aeson >= 0.6,+                     aeson >= 0.11,                      aeson-pretty,                      base >= 4.10 && < 5,                      bytestring >= 0.9,
README.md view
@@ -1,6 +1,6 @@ # HTF - The Haskell Test Framework -[![Build Status](https://travis-ci.org/skogsbaer/HTF.svg?branch=master)](https://travis-ci.com/github/skogsbaer/HTF)+[![Build Status](https://github.com/skogsbaer/HTF/actions/workflows/haskell-ci.yml/badge.svg)](https://github.com/skogsbaer/HTF/actions/workflows/haskell-ci.yml) [![Hackage](https://img.shields.io/hackage/v/HTF.svg)](http://hackage.haskell.org/package/HTF)  * Documentation:     http://hackage.haskell.org/package/HTF
Test/Framework/AssertM.hs view
@@ -48,11 +48,11 @@     fmap = liftM  instance Applicative AssertBool where-    pure  = return+    pure  = AssertOk     (<*>) = ap  instance Monad AssertBool where-    return = AssertOk+    return = pure     AssertFailed stack >>= _ = AssertFailed stack     AssertOk x >>= k = k x #if !(MIN_VERSION_base(4,13,0))
scripts/check.sh view
@@ -14,7 +14,7 @@     exit 1 fi -YAMLS=$(grep '^- HTF_TRAVIS_STACK_ARGS' "$TRAVIS" | sed 's/^.*="--stack-yaml //g; s/"$//g')+YAMLS=$(grep '^- HTF_TEST_STACK_ARGS' "$TRAVIS" | sed 's/^.*="--stack-yaml //g; s/"$//g')  if [ -z "$TRAVIS_BUILD_DIR" ]; then     export TRAVIS_BUILD_DIR="$TOP"@@ -24,14 +24,14 @@     echo >&2     eval yaml="$yaml" # evaluate variables contained in $yaml     echo >&2 "Checking with $yaml ..."-    export HTF_TRAVIS_STACK_ARGS="--stack-yaml $yaml"-    stack $HTF_TRAVIS_STACK_ARGS build+    export HTF_TEST_STACK_ARGS="--stack-yaml $yaml"+    stack $HTF_TEST_STACK_ARGS build     ecode=$?     if [ $ecode -ne 0 ]; then         echo >&2 "Build for $yaml failed!"         exit 1     fi-    stack $HTF_TRAVIS_STACK_ARGS test+    stack $HTF_TEST_STACK_ARGS test     ecode=$?     if [ $ecode -ne 0 ]; then         echo >&2 "Test for $yaml failed!"
scripts/local-htfpp view
@@ -1,7 +1,15 @@ #!/bin/bash  TOP=$(cd $(dirname ${BASH_SOURCE[0]})/.. > /dev/null && pwd -P)-dist=$(stack $HTF_TRAVIS_STACK_ARGS path --dist-dir 2> /dev/null)++if [ -z "$HTF_TEST_STACK_ARGS" -a ! -z "$HTF_TEST_STACK_YAML" ]; then+    HTF_TEST_STACK_ARGS="--stack-yaml $HTF_TEST_STACK_YAML"+fi+if [ -z "$HTF_TEST_STACK_ARGS" -a ! -z "$HTF_STACK_YAML" ]; then+    HTF_TEST_STACK_ARGS="--stack-yaml $HTF_STACK_YAML"+fi++dist=$(stack $HTF_TEST_STACK_ARGS path --dist-dir 2> /dev/null) find=find if [ "$(uname)" == "Darwin" ]; then     find=gfind@@ -13,7 +21,7 @@     if [ ! -d "$d" ]; then         d="$(dirname $d)"     fi-    bin=$($find "$d" -name htfpp -type f -executable -printf "%T+\t%p\n" | sort -r | head -1 | gawk '{print $2}')+    bin=$($find "$d" -name htfpp -type f -executable -printf "%T+\t%p\n" | sort -r | head -1 | cut -f 2) }  find_bin
tests/TestHTF.hs view
@@ -5,6 +5,7 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE QuasiQuotes #-}+{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -F -pgmF ./scripts/local-htfpp #-} -- -- Copyright (c) 2005,2010   Stefan Wehr - http://www.stefanwehr.de@@ -38,7 +39,12 @@ import System.IO.Temp import Control.Exception import Control.Monad-import qualified Data.HashMap.Strict as M++#if MIN_VERSION_aeson(2,0,0)+import qualified Data.Aeson.KeyMap as KM+#else+import qualified Data.HashMap.Strict as KM+#endif import qualified Data.HashSet as Set import qualified Data.Aeson as J import qualified Data.Aeson.Encode.Pretty as J@@ -299,7 +305,7 @@                                                                                       ,"line" .= J.toJSON (97+lineOffset)]]]])     where       lineOffset :: Int-      lineOffset = 32+      lineOffset = 38       checkStatus tuple@(pass, fail, error, pending, timedOut) json =           {-             {"location":null@@ -312,11 +318,11 @@             ,"wallTime":11}            -}           case json of-            J.Object objJson | Just (J.Object testObj) <- M.lookup "test" objJson-                             , Just (J.String flatName) <- M.lookup "flatName" testObj-                             , Just (J.String "test-end") <- M.lookup "type" objJson-                             , Just (J.String result) <- M.lookup "result" objJson-                             , Just (J.Bool to) <- M.lookup "timedOut" objJson ->+            J.Object objJson | Just (J.Object testObj) <- KM.lookup "test" objJson+                             , Just (J.String flatName) <- KM.lookup "flatName" testObj+                             , Just (J.String "test-end") <- KM.lookup "type" objJson+                             , Just (J.String result) <- KM.lookup "result" objJson+                             , Just (J.Bool to) <- KM.lookup "timedOut" objJson ->                 let shortName =                         let t = T.tail (T.dropWhile (/= ':') flatName)                         in if "tests/" `T.isPrefixOf` t@@ -353,8 +359,8 @@       matches json pred =           case (json, pred) of             (J.Object objJson, J.Object objPred) ->-                M.foldrWithKey (\k vPred b ->-                                    b && case M.lookup k objJson of+                KM.foldrWithKey (\k vPred b ->+                                    b && case KM.lookup k objJson of                                            Just vJson -> matches vJson vPred                                            Nothing -> False)                                True objPred
tests/compile-errors/run-tests.sh view
@@ -9,7 +9,7 @@     echo "Running test $test ..."     command -v grep >/dev/null 2>&1 || \         { echo >&2 "Test $0 requires ``grep'' but it's not installed.  Aborting."; exit 1; }-    compile_cmd="stack $HTF_TRAVIS_STACK_ARGS ghc --package HTF -- -XPackageImports $test"+    compile_cmd="stack $HTF_TEST_STACK_ARGS ghc --package HTF -- -XPackageImports $test"     $compile_cmd 2>&1 | grep "$test":$lineno > /dev/null     grep_ecode=${PIPESTATUS[1]}     if [ "$grep_ecode" != "0" ]@@ -17,7 +17,7 @@         echo "Compile error for $test did not occur in line $lineno, exit code of grep: ${grep_ecode}"         echo "Compile command: $compile_cmd"         echo "Stack version: $(stack --version)"-        echo "GHC version: $(stack $HTF_TRAVIS_STACK_ARGS ghc -- --version)"+        echo "GHC version: $(stack $HTF_TEST_STACK_ARGS ghc -- --version)"         echo "Here is the output of the compiler:"         $compile_cmd         exit 1