From 4621b651bc1f6d3a139982e3608e93c65fb0892b Mon Sep 17 00:00:00 2001 From: Thomas Miedema Date: Wed, 9 Apr 2025 16:46:17 +0200 Subject: [PATCH] fix: -i1 for files with only 1 test --- src/Parse.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Parse.hs b/src/Parse.hs index f6a31af..a7ae5d6 100644 --- a/src/Parse.hs +++ b/src/Parse.hs @@ -32,8 +32,7 @@ parseShellTestFile debug preProcessor f = do p <- parseFromFileWithPreprocessor shelltestfile preProcessor f case p of Right ts -> do - let ts' | length ts > 1 = [t{testname=testname t++":"++show n} | (n,t) <- zip ([1..]::[Int]) ts] - | otherwise = ts + let ts' = [t{testname=testname t++":"++show n} | (n,t) <- zip ([1..]::[Int]) ts] when (debug) $ do printf "parsed %s:\n" f mapM_ (putStrLn.(' ':).ppShow) ts'