diff --git a/stack.yaml b/stack.yaml index 584da8b7..e7be4d99 100644 --- a/stack.yaml +++ b/stack.yaml @@ -32,7 +32,7 @@ extra-deps: - git: https://github.com/tbidne/fs-utils.git commit: 5406cea74491f382478e70734535c62fe6deef7d - git: https://github.com/tbidne/monad-effects.git - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 subdirs: - lib/effects-async - lib/effects-env diff --git a/stack.yaml.lock b/stack.yaml.lock index c822c542..664425b5 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -63,146 +63,146 @@ packages: commit: 5406cea74491f382478e70734535c62fe6deef7d git: https://github.com/tbidne/fs-utils.git - completed: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git name: effects-async pantry-tree: - sha256: 3ca9d0da7ec21b1763c73bec4fbc1d9256d35bf5e3afb47aa55798461fd0e8f5 + sha256: 6e143ea4f58d27e78ffb4d329219034155aeb8fed720f848a987d2706574e553 size: 236 subdir: lib/effects-async version: '0.1' original: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git subdir: lib/effects-async - completed: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git name: effects-env pantry-tree: - sha256: cea13c54356657f05795bb9f40f719b75750d68d0870a128a82884944f5be906 - size: 235 + sha256: 3fd5ef05945557f7928c00ff63620cc4eb4271d4adfca80f7f9e0b8384ee2f66 + size: 234 subdir: lib/effects-env version: '0.1' original: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git subdir: lib/effects-env - completed: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git name: effects-fs pantry-tree: - sha256: f476e624093ce8b4bd058328d797e7f3d5ee85e766e2bc7295ba793df83cb8c7 - size: 816 + sha256: edab38a3e9d0999bc92f8738bedcd98041c058748c853020f384b2e10ec027f2 + size: 1023 subdir: lib/effects-fs version: '0.1' original: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git subdir: lib/effects-fs - completed: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git name: effects-ioref pantry-tree: - sha256: 8dee29d4e5ee01399ff19635716fa30d47f65d36c63965e1512d552d090c60d8 - size: 224 + sha256: 1d91747b2caf0e67f90bf43464b73a25c80f5e1bd30902a2cb9f233f578d3969 + size: 223 subdir: lib/effects-ioref version: '0.1' original: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git subdir: lib/effects-ioref - completed: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git name: effects-optparse pantry-tree: - sha256: 4128b61487c50d19b001fa09a42efc161fcb498d57725328ddc148e652dbe075 + sha256: d93225890965ef43c461af211451e2ef9350ae60cbd86ba25aae8dd2e0ae8e8c size: 230 subdir: lib/effects-optparse version: '0.1' original: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git subdir: lib/effects-optparse - completed: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git name: effects-stm pantry-tree: - sha256: 9892ad01ca527fa7f875cd12dc0c2d2be7fbe5b1e8d314ba586159e53c68d75d - size: 231 + sha256: d03470a38ce10e18a065cbf3f6b2af3830687800edcde299f460122b03c12a26 + size: 230 subdir: lib/effects-stm version: '0.1' original: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git subdir: lib/effects-stm - completed: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git name: effects-time pantry-tree: - sha256: 1219132a44f027ea7080029eddf1caea1d46ea2c916c8b26b9be9f1e09ac07be + sha256: feae6b589a816b73dc2443ee512b5eb913827e9d5c6ea8129331f330f87c0c43 size: 281 subdir: lib/effects-time version: '0.1' original: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git subdir: lib/effects-time - completed: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git name: effects-terminal pantry-tree: - sha256: e72cef5145c99c24bf1a4cea69e69370b67fe8d702dab885e9d4f8671230eba3 + sha256: ec0ee32b31fc77f759992ea759ffe41cd9a8888eebd6e4a1d57ac4852365ce84 size: 237 subdir: lib/effects-terminal version: '0.1' original: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git subdir: lib/effects-terminal - completed: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git name: effects-thread pantry-tree: - sha256: 13c21fbeb95dbc296bec59267269adf63409a3451e93658f1b97b2fcb56e214a - size: 237 + sha256: fbcf6f7c1bf0bdd73ef7964e5c69fc0ada5c5a27b494e2a928afa1c5e6259c95 + size: 236 subdir: lib/effects-thread version: '0.1' original: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git subdir: lib/effects-thread - completed: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git name: effects-typed-process pantry-tree: - sha256: 2f2b68bc84d67257705cce6f8125dca2ea3d3459857e85b10edac64ea2621bc8 + sha256: 51e3987661d1fbfff9e4e838b609c489fd8e92c6e6968f99d0fd87c6698560a5 size: 240 subdir: lib/effects-typed-process version: '0.1' original: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git subdir: lib/effects-typed-process - completed: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git name: effects-unix-compat pantry-tree: - sha256: 1672a1c422dc5669f40957ca87153bd47b30497e5de5bc90996122579de8bd5e + sha256: 5faebc4fd2e09b012bb53b9e5aaa4b304393ce99f01a56d270486888424e52ca size: 366 subdir: lib/effects-unix-compat version: '0.1' original: - commit: 8021f9a0855e644d91b73e6b2bcf20406ebbebb8 + commit: 7cc259bce3becc2c72bed1e8dd6f46ecc41efe70 git: https://github.com/tbidne/monad-effects.git subdir: lib/effects-unix-compat - completed: diff --git a/test/functional/Functional/Examples/CommandLogging.hs b/test/functional/Functional/Examples/CommandLogging.hs index 0c78753b..f3f93d7b 100644 --- a/test/functional/Functional/Examples/CommandLogging.hs +++ b/test/functional/Functional/Examples/CommandLogging.hs @@ -73,7 +73,7 @@ bufferLengthSplit testArgs = ReadStrategyTestParametricSetup "Runs --command-log-buffer-length split example" run - ( do + ( \_ -> do outFile <- ( [osp|buffer-length-split.log|]) . view #tmpDir <$> testArgs let outFileStr = unsafeDecode outFile args = @@ -108,7 +108,7 @@ bufferLengthUnsplit testArgs = ReadStrategyTestSetup "Runs --command-log-buffer-length unsplit example" run - ( do + ( \_ -> do outFile <- ( [osp|buffer-length-unsplit.log|]) . view #tmpDir <$> testArgs let outFileStr = unsafeDecode outFile args = @@ -153,7 +153,7 @@ bufferTimeoutSplit testArgs = ReadStrategyTestParametricSetup "Runs --command-log-buffer-timeout split example" run - ( do + ( \_ -> do outFile <- ( [osp|buffer-timeout-split.log|]) . view #tmpDir <$> testArgs let outFileStr = unsafeDecode outFile args = @@ -188,7 +188,7 @@ bufferTimeoutUnsplit testArgs = ReadStrategyTestSetup "Runs --command-log-buffer-timeout unsplit example" run - ( do + ( \_ -> do outFile <- ( [osp|buffer-timeout-unsplit.log|]) . view #tmpDir <$> testArgs let outFileStr = unsafeDecode outFile args = diff --git a/test/functional/Functional/Examples/FileLogging.hs b/test/functional/Functional/Examples/FileLogging.hs index 0cb70ec0..96350f28 100644 --- a/test/functional/Functional/Examples/FileLogging.hs +++ b/test/functional/Functional/Examples/FileLogging.hs @@ -2,6 +2,7 @@ module Functional.Examples.FileLogging (tests) where +import FileSystem.OsPath (unsafeEncode) import Functional.Prelude import Functional.TestArgs (TestArgs) import Test.Shrun.Verifier qualified as V @@ -66,7 +67,7 @@ fileLogCommandNameTruncN testArgs = ReadStrategyTestParametricSetup "Runs --file-log-command-name-trunc 10 example" run - ( do + ( \_ -> do outFile <- ( [osp|readme-file-log-command-name-trunc-out.log|]) . view #tmpDir <$> testArgs let outFileStr = unsafeDecode outFile args = @@ -101,7 +102,7 @@ fileLogDeleteOnSuccess testArgs = ReadStrategyTestParametricSetup "Runs file-log-delete-on-success example" run - ( do + ( \_ -> do outFile <- ( [osp|del-on-success.log|]) . view #tmpDir <$> testArgs let outFileStr = unsafeDecode outFile args = @@ -161,7 +162,7 @@ fileLogLineTruncN testArgs = ReadStrategyTestParametricSetup "Runs --file-log-line-trunc 120 example" run - ( do + ( \_ -> do outFile <- ( [osp|line-trunc.log|]) . view #tmpDir <$> testArgs let outFileStr = unsafeDecode outFile args = @@ -190,6 +191,41 @@ fileLogLineTruncN testArgs = -- NOTE: File log mode tests are not configuration.md examples due to -- simplicity. +-- NOTE: [File Log Mode tests] +-- +-- The file log mode tests test the different behaviors of the log file: +-- +-- append: logs are appended to the same file. +-- rename: we create multiple log files with sequential names. +-- write: the log file is overwritten. +-- +-- In general, this means we create a base log file like +-- +-- /tmp/test-name_read-strategy.log +-- +-- where read-strategy is used to provide a unique path for each test +-- (e.g. we do not want fileLogModeAppend to use the same path for its +-- buffer and block tests, since the interference will cause failures). +-- +-- We then check for existence and content, and then -- depending on the +-- test -- run checks against renamed log files i.e. +-- +-- /tmp/test-name_read-strategy (1).log +--- +-- For example, in the fileLogModeRename block test, we expect the following to +-- all exist: +-- +-- /tmp/fileLogModeRename_block.log +-- /tmp/fileLogModeRename_block (1).log +-- /tmp/fileLogModeRename_block (2).log +-- +-- OTOH, for fileLogModeAppend, we expect only +-- +-- /tmp/fileLogModeAppend_block.log +-- +-- to exist, while the others should __not__ exist. We use the mkLogPath +-- function to make creating these paths a little nicer. + fileLogModeAppend :: IO TestArgs -> ReadStrategyTestParams fileLogModeAppend testArgs = ReadStrategyTestParametricSetup @@ -199,9 +235,9 @@ fileLogModeAppend testArgs = run xs run xs ) - ( do + ( \rsType -> do tmpDir <- view #tmpDir <$> testArgs - let outFile = tmpDir [osp|fileLogModeAppend.log|] + let outFile = mkLogPath tmpDir baseName rsType Nothing outFileStr = unsafeDecode outFile args = withNoConfig @@ -211,12 +247,12 @@ fileLogModeAppend testArgs = "append", "sleep 2" ] - pure (args, tmpDir) + pure (args, (tmpDir, rsType)) ) - ( \(resultsConsole, tmpDir) -> do + ( \(resultsConsole, (tmpDir, rsType)) -> do V.verifyExpected resultsConsole expectedConsole - let log = tmpDir [osp|fileLogModeAppend.log|] + let log = mkLogPath tmpDir baseName rsType Nothing exists <- doesFileExist log assertBool ("File should exist: " <> decodeLenient log) exists @@ -226,14 +262,15 @@ fileLogModeAppend testArgs = -- because we are appending 3 lines to the file 3 times 9 @=? length resultsFile - let log2 = tmpDir [osp|fileLogModeAppend (1).log|] - log3 = tmpDir [osp|fileLogModeAppend (2).log|] + let log2 = mkLogPath tmpDir baseName rsType (Just 1) + log3 = mkLogPath tmpDir baseName rsType (Just 2) for_ [log2, log3] $ \badLog -> do badExists <- doesFileExist badLog assertBool ("File should not exist: " <> decodeLenient badLog) (not badExists) ) where + baseName = [osp|fileLogModeAppend_|] expectedConsole = [ withSuccessPrefix "sleep 2", finishedPrefix @@ -248,9 +285,9 @@ fileLogModeRename testArgs = run xs run xs ) - ( do + ( \rsType -> do tmpDir <- view #tmpDir <$> testArgs - let outFile = tmpDir [osp|fileLogModeRename.log|] + let outFile = mkLogPath tmpDir baseName rsType Nothing outFileStr = unsafeDecode outFile args = withNoConfig @@ -260,14 +297,14 @@ fileLogModeRename testArgs = "rename", "sleep 2" ] - pure (args, tmpDir) + pure (args, (tmpDir, rsType)) ) - ( \(resultsConsole, tmpDir) -> do + ( \(resultsConsole, (tmpDir, rsType)) -> do V.verifyExpected resultsConsole expectedConsole - let log1 = tmpDir [osp|fileLogModeRename.log|] - log2 = tmpDir [osp|fileLogModeRename (1).log|] - log3 = tmpDir [osp|fileLogModeRename (2).log|] + let log1 = mkLogPath tmpDir baseName rsType Nothing + log2 = mkLogPath tmpDir baseName rsType (Just 1) + log3 = mkLogPath tmpDir baseName rsType (Just 2) for_ [log1, log2, log3] $ \log -> do exists <- doesFileExist log @@ -276,11 +313,14 @@ fileLogModeRename testArgs = resultsFile <- readLogFile log V.verifyExpected resultsFile expectedFile - let badLog = tmpDir [osp|fileLogModeRename (3).log|] + 3 @=? length resultsFile + + let badLog = mkLogPath tmpDir baseName rsType (Just 3) exists <- doesFileExist badLog assertBool ("File should not exist: " <> decodeLenient badLog) (not exists) ) where + baseName = [osp|fileLogModeRename_|] expectedConsole = [ withSuccessPrefix "sleep 2", finishedPrefix @@ -296,9 +336,9 @@ fileLogModeWrite testArgs = run xs run xs ) - ( do + ( \rsType -> do tmpDir <- view #tmpDir <$> testArgs - let outFile = tmpDir [osp|fileLogModeWrite.log|] + let outFile = mkLogPath tmpDir baseName rsType Nothing outFileStr = unsafeDecode outFile args = withNoConfig @@ -308,26 +348,29 @@ fileLogModeWrite testArgs = "write", "sleep 2" ] - pure (args, tmpDir) + pure (args, (tmpDir, rsType)) ) - ( \(resultsConsole, tmpDir) -> do + ( \(resultsConsole, (tmpDir, rsType)) -> do V.verifyExpected resultsConsole expectedConsole - let log = tmpDir [osp|fileLogModeWrite.log|] + let log = mkLogPath tmpDir baseName rsType Nothing exists <- doesFileExist log assertBool ("File should exist: " <> decodeLenient log) exists resultsFile <- readLogFile log V.verifyExpected resultsFile expectedFile - let log2 = tmpDir [osp|fileLogModeWrite (1).log|] - log3 = tmpDir [osp|fileLogModeWrite (2).log|] + 3 @=? length resultsFile + + let log2 = mkLogPath tmpDir baseName rsType (Just 1) + log3 = mkLogPath tmpDir baseName rsType (Just 2) for_ [log2, log3] $ \badLog -> do badExists <- doesFileExist badLog assertBool ("File should not exist: " <> decodeLenient badLog) (not badExists) ) where + baseName = [osp|fileLogModeWrite_|] expectedConsole = [ withSuccessPrefix "sleep 2", finishedPrefix @@ -339,7 +382,7 @@ fileLogStripControlAll testArgs = ReadStrategyTestParametricSetup "Runs file-log strip-control all example" run - ( do + ( \_ -> do outFile <- ( [osp|readme-file-out-strip-control-all.log|]) . view #tmpDir <$> testArgs let outFileStr = unsafeDecode outFile args = @@ -366,7 +409,7 @@ fileLogStripControlNone testArgs = ReadStrategyTestParametricSetup "Runs file-log strip-control none example" run - ( do + ( \_ -> do outFile <- ( [osp|readme-file-out-strip-control-none.log|]) . view #tmpDir <$> testArgs let outFileStr = unsafeDecode outFile args = @@ -395,7 +438,7 @@ fileLogStripControlSmart testArgs = ReadStrategyTestParametricSetup "Runs file-log strip-control smart example" run - ( do + ( \_ -> do outFile <- ( [osp|readme-file-out-strip-control-smart.log|]) . view #tmpDir <$> testArgs let outFileStr = unsafeDecode outFile args = @@ -418,3 +461,38 @@ fileLogStripControlSmart testArgs = "printf ' foo hello bye '; sleep 2" " foo \ESC[35m hello bye " ] + +-- | mkLogPath is used to make log paths, based on the current read-strategy +-- (used for uniqueness) and sequential number (for file-log-mode rename) +-- +-- Examples: +-- +-- @ +-- -- mkLogPath /tmp fileLogModeAppend_ block Nothing +-- "\/tmp\/fileLogModeAppend_block.log" +-- +-- -- mkLogPath /tmp fileLogModeAppend_ block (Just 1) +-- "\/tmp\/fileLogModeAppend_block (1).log" +-- +-- -- mkLogPath /tmp fileLogModeAppend_ block (Just 2) +-- "\/tmp\/fileLogModeAppend_block (2).log" +-- @ +-- +-- See NOTE: [File Log Mode tests] for the motivation. +mkLogPath :: + -- | Temp directory + OsPath -> + -- | base name + OsPath -> + -- | read-strategy type + OsPath -> + -- | Sequence file number, if applicable + Maybe Int -> + -- | Combined name + OsPath +mkLogPath tmpDir base rsType mSEqNum = + tmpDir base <> rsType <> suffix + where + suffix = case mSEqNum of + Nothing -> [osp|.log|] + Just i -> [osp| (|] <> unsafeEncode (show i) <> [osp|).log|] diff --git a/test/functional/Functional/Miscellaneous.hs b/test/functional/Functional/Miscellaneous.hs index 170efe17..ed94ec64 100644 --- a/test/functional/Functional/Miscellaneous.hs +++ b/test/functional/Functional/Miscellaneous.hs @@ -193,7 +193,7 @@ formatsFileLogs testArgs = ReadStrategyTestSetup "Formats file logs" run - ( do + ( \_ -> do outFile <- ( [osp|file-log-formatted.log|]) . view #tmpDir <$> testArgs let outFileStr = unsafeDecode outFile args = diff --git a/test/functional/Functional/ReadStrategyTest.hs b/test/functional/Functional/ReadStrategyTest.hs index cfda53ee..6893b89e 100644 --- a/test/functional/Functional/ReadStrategyTest.hs +++ b/test/functional/Functional/ReadStrategyTest.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE QuasiQuotes #-} + module Functional.ReadStrategyTest ( ReadStrategyOpt (..), ReadStrategyTestParams (..), @@ -37,7 +39,7 @@ data ReadStrategyTestParams where -- | Assertions (a -> IO ()) -> ReadStrategyTestParams - -- | Simple test. + -- | Simple test, not parametric. ReadStrategyTestSimple :: -- | Test description String -> @@ -57,8 +59,11 @@ data ReadStrategyTestParams where String -> -- | Test runner (List String -> IO a) -> - -- | Args setup - (IO (List String, r)) -> + -- | Args setup. The argument is an OsPath verison of the read-startegy + -- type i.e. block, buffer, or default. We use this for creating unique + -- paths i.e. we do not want two read-strategy tests to use the same + -- path when creating log files. + (OsPath -> IO (List String, r)) -> -- | Assertions ((a, r) -> IO ()) -> ReadStrategyTestParams @@ -68,8 +73,11 @@ data ReadStrategyTestParams where String -> -- | Test runner (List String -> IO a) -> - -- | Args - (IO (List String, r)) -> + -- | Args setup. The argument is an OsPath verison of the read-startegy + -- type i.e. block, buffer, or default. We use this for creating unique + -- paths i.e. we do not want two read-strategy tests to use the same + -- path when creating log files. + (OsPath -> IO (List String, r)) -> -- | Block Assertions ((a, r) -> IO ()) -> -- | BlockLineBuffer assertions @@ -125,9 +133,9 @@ testReadStrategy (ReadStrategyTestParametricSetup desc runner mkArgs assertResul ] ] where - defaultTest = defaultTestSetup desc runner mkArgs assertResults - blockTest = blockTestSetup desc runner mkArgs assertResults - bufferTest = bufferTestSetup desc runner mkArgs assertResults + defaultTest = defaultTestSetup desc runner (mkArgs [osp|default|]) assertResults + blockTest = blockTestSetup desc runner (mkArgs [osp|block|]) assertResults + bufferTest = bufferTestSetup desc runner (mkArgs [osp|buffer|]) assertResults testReadStrategy (ReadStrategyTestSetup desc runner mkArgs blockAssertions blockLineBufferAssertions) = [ askOption $ \case ReadStrategyBlock -> blockTest @@ -140,8 +148,8 @@ testReadStrategy (ReadStrategyTestSetup desc runner mkArgs blockAssertions block ] ] where - blockTest = blockTestSetup desc runner mkArgs blockAssertions - bufferTest = bufferTestSetup desc runner mkArgs blockLineBufferAssertions + blockTest = blockTestSetup desc runner (mkArgs [osp|block|]) blockAssertions + bufferTest = bufferTestSetup desc runner (mkArgs [osp|buffer|]) blockLineBufferAssertions -- NOTE: For parametric tests, we also want to verify the default -- (i.e. no args) behavior passes, since that is how such examples are defined.