diff --git a/testing/testing_comment.py b/testing/testing_comment.py index 105fac9..c9e5832 100644 --- a/testing/testing_comment.py +++ b/testing/testing_comment.py @@ -7,6 +7,7 @@ class TestComment(unittest.TestCase): def validate(self, test_cases: list) -> None: for test_case in test_cases: output = cooklang.parseRecipe(test_case["input"]) + print(output) self.assertEqual(output["steps"][0][0]["value"], test_case["output_steps"]) def test_basic(self) -> None: @@ -28,3 +29,15 @@ def test_close_twice(self) -> None: ] self.validate(test_cases) + + def test_multiline(self) -> None: + test_cases = [ + { + "input": "meal for 4 people [- scale linearly \n for people \n but time does not scale-]", + "output_steps": "meal for 4 people ", + }, + ] + for test_case in test_cases: + output = cooklang.parseRecipe(test_case["input"]) + print(output) + self.assertEqual(len(output["steps"]), 1)