<commit_before>
module Test.Rattle(main) where

import Development.Rattle
import System.FilePattern.Directory
import Development.Shake.FilePath
import Control.Monad
import Test.Type

main = testSimple $ rattle $ do
    cs <- liftIO $ getDirectoryFiles "." [shakeRoot </> "src/Test/C/*.c"]
    let toO x = takeBaseName x <.> "o"
    forM_ cs $ \c -> cmd ["gcc","-o",toO c,"-c",c]
    cmd $ ["gcc","-o","Main" <.> exe] ++ map toO cs
    cmd ["Main" <.> exe]<commit_msg>Another attempt at fixing the Rattle test case<commit_after>
module Test.Rattle(main) where

import Development.Rattle
import System.FilePattern.Directory
import Development.Shake.FilePath
import Control.Monad
import Test.Type

main = testSimple $ rattle $ do
    cs <- liftIO $ getDirectoryFiles "." [shakeRoot </> "src/Test/C/*.c"]
    let toO x = takeBaseName x <.> "o"
    forM_ cs $ \c -> cmd ["gcc","-o",toO c,"-c",c]
    cmd $ ["gcc","-o","Main" <.> exe] ++ map toO cs
    cmd ["./Main" <.> exe]
{'fraction_non_alphanumeric': 0.17131062951496387, 'fraction_numerical': 0.0, 'mean_word_length': 3.490740740740741, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '67734', 'n_tokens_mistral': 353, 'n_tokens_neox': 343, 'n_words': 94}