qute-syntax 0.1.0 → 0.1.1
raw patch · 2 files changed
+22/−5 lines, 2 filesdep +directoryPVP ok
version bump matches the API change (PVP)
Dependencies added: directory
API changes (from Hackage documentation)
Files
- qute-syntax.cabal +2/−1
- test/Main.hs +20/−4
qute-syntax.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.4 name: qute-syntax-version: 0.1.0+version: 0.1.1 synopsis: This package provides a parser for the QBE intermediate language. description: This library provides a parser for the [QBE intermediate language](https://c9x.me/compile/)@@ -63,6 +63,7 @@ process, filepath, containers,+ directory, tasty >=1.4.3, tasty-hunit >=0.10, tasty-golden >=2.3.5,
test/Main.hs view
@@ -1,16 +1,32 @@--- SPDX-FileCopyrightText: 2025 Sören Tempel <soeren+git@soeren-tempel.net>+-- SPDX-FileCopyrightText: 2025-2026 Sören Tempel <soeren+git@soeren-tempel.net> -- -- SPDX-License-Identifier: GPL-3.0-only module Main (main) where +import Control.Monad (unless)+import Data.Maybe (isJust) import Golden import Parser+import System.Directory (findExecutable)+import System.IO (hPutStrLn, stderr) import Test.Tasty import Types main :: IO ()-main = defaultMain tests+main = do+ hasQBE <- isJust <$> findExecutable "qbe"+ unless hasQBE $+ hPutStrLn stderr "WARNING: qbe(1) not installed, skipping Golden tests!"+ defaultMain $ tests hasQBE -tests :: TestTree-tests = testGroup "Tests" [mkParser, goldenTests, typesTests]+-- Golden tests require qbe(1) to be installed, which is not available on Hackage.+tests :: Bool -> TestTree+tests hasQBE =+ let testTree =+ if hasQBE+ then baseTests ++ [goldenTests]+ else baseTests+ in testGroup "Tests" testTree+ where+ baseTests = [mkParser, typesTests]