From ffedc5dbb3e7f9cfb260ce9a417fd005eda437f2 Mon Sep 17 00:00:00 2001 From: Umur Ozkul Date: Thu, 19 May 2022 20:38:10 +0200 Subject: [PATCH] multi-line tests --- .../Reducer_Peggy_Parse_test.res | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_test.res b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_test.res index 51431907..591fc11a 100644 --- a/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_test.res +++ b/packages/squiggle-lang/__tests__/Reducer/Reducer_Peggy/Reducer_Peggy_Parse_test.res @@ -297,6 +297,41 @@ describe("parsing new line", () => { `, "{:f = {:x = {1}; :y = {2}; :z = {3}; (::add (::add :x :y) :z)}}", ) + testParse( + ` + f={ + x=1 + y=2 + z=3 + x+y+z + } + g=f+4 + g + `, + "{:f = {:x = {1}; :y = {2}; :z = {3}; (::add (::add :x :y) :z)}; :g = {(::add :f 4)}; :g}", + ) + testParse( + ` + f = + { + x=1; //x + y=2 //y + z= + 3 + x+ + y+ + z + } + g = + f + + 4 + g -> + h -> + p -> + q + `, + "{:f = {:x = {1}; :y = {2}; :z = {3}; (::add (::add :x :y) :z)}; :g = {(::add :f 4)}; (::q (::p (::h :g)))}", + ) testParse( ` a |>