Commit pending changes: check-recipes tool and reconstructed test file

This commit is contained in:
2026-05-19 13:29:27 -04:00
parent 2641c84ee3
commit 1314c38e85
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -2,11 +2,11 @@
module Main (main) where module Main (main) where
import qualified Data.Text.IO as TIO
import Roux.Parser (parseCookFile)
import System.Directory (listDirectory) import System.Directory (listDirectory)
import System.Environment (getArgs) import System.Environment (getArgs)
import System.FilePath (takeExtension, (</>)) import System.FilePath (takeExtension, (</>))
import qualified Data.Text.IO as TIO
import Roux.Parser (parseCookFile)
main :: IO () main :: IO ()
main = do main = do
+6 -6
View File
@@ -373,9 +373,9 @@ spec = do
Left err -> expectationFailure ("parse failed: " <> err) Left err -> expectationFailure ("parse failed: " <> err)
Right recipe -> do Right recipe -> do
let items = stepItems recipe let items = stepItems recipe
items `shouldBe` items
[ StepIngredient (Ingredient "water" (Just (Quantity (3 % 2) (Just "cups") False)) Nothing) `shouldBe` [ StepIngredient (Ingredient "water" (Just (Quantity (3 % 2) (Just "cups") False)) Nothing)
] ]
it "parses quantity with trailing unit (no %)" $ do it "parses quantity with trailing unit (no %)" $ do
let input = "@gelatine{3tsp}" let input = "@gelatine{3tsp}"
@@ -383,9 +383,9 @@ spec = do
Left err -> expectationFailure ("parse failed: " <> err) Left err -> expectationFailure ("parse failed: " <> err)
Right recipe -> do Right recipe -> do
let items = stepItems recipe let items = stepItems recipe
items `shouldBe` items
[ StepIngredient (Ingredient "gelatine" (Just (Quantity 3 (Just "tsp") False)) Nothing) `shouldBe` [ StepIngredient (Ingredient "gelatine" (Just (Quantity 3 (Just "tsp") False)) Nothing)
] ]
describe "Recipe references" $ do describe "Recipe references" $ do
it "parses a recipe reference" $ do it "parses a recipe reference" $ do