From 345974700635ec662a0883c9040cf93bb7748609 Mon Sep 17 00:00:00 2001 From: butterunderflow Date: Thu, 20 Oct 2022 19:05:18 +0800 Subject: [PATCH] printing test for spread anywhere feature --- tests/printer/expr/expected/list.res.txt | 13 +++++++++++++ tests/printer/expr/list.res | 11 +++++++++++ 2 files changed, 24 insertions(+) diff --git a/tests/printer/expr/expected/list.res.txt b/tests/printer/expr/expected/list.res.txt index f7fcbf88..b71cf0f9 100644 --- a/tests/printer/expr/expected/list.res.txt +++ b/tests/printer/expr/expected/list.res.txt @@ -2,6 +2,7 @@ let x = list{} let x = list{1} let x = list{1, 2} let x = list{1, 2, 3} +let x = Belt.List.concatMany([list{1, 2, ...x}, list{3, ...x}]) let x = list{ superLoooooooooooooooooooooooooooooongIiiiiiiiiideeeentifieeeeeeeeeeeeeeeeer, @@ -17,3 +18,15 @@ let x = list{ superLoooooooooooooooooooooooooooooongIiiiiiiiiideeeentifieeeeeeeeeeeeeeeeer, ...superLoooooooooooooooooooooooooooooongListHere, } + +let x = Belt.List.concatMany([ + list{ + superLoooooooooooooooooooooooooooooongIiiiiiiiiideeeentifieeeeeeeeeeeeeeeeer, + superLoooooooooooooooooooooooooooooongIiiiiiiiiideeeentifieeeeeeeeeeeeeeeeer, + ...superLoooooooooooooooooooooooooooooongListHere, + }, + list{ + superLoooooooooooooooooooooooooooooongIiiiiiiiiideeeentifieeeeeeeeeeeeeeeeer, + ...superLoooooooooooooooooooooooooooooongListHere, + }, +]) diff --git a/tests/printer/expr/list.res b/tests/printer/expr/list.res index 06d3210b..d2313120 100644 --- a/tests/printer/expr/list.res +++ b/tests/printer/expr/list.res @@ -2,6 +2,7 @@ let x = list{} let x = list{1} let x = list{1, 2} let x = list{1, 2, 3} +let x = list{1, 2, ...x, 3, ...x} let x = list{ superLoooooooooooooooooooooooooooooongIiiiiiiiiideeeentifieeeeeeeeeeeeeeeeer, @@ -18,3 +19,13 @@ let x = list{ superLoooooooooooooooooooooooooooooongIiiiiiiiiideeeentifieeeeeeeeeeeeeeeeer, ...superLoooooooooooooooooooooooooooooongListHere, } + + + + +let x = list{ + superLoooooooooooooooooooooooooooooongIiiiiiiiiideeeentifieeeeeeeeeeeeeeeeer, + superLoooooooooooooooooooooooooooooongIiiiiiiiiideeeentifieeeeeeeeeeeeeeeeer, ...superLoooooooooooooooooooooooooooooongListHere, + superLoooooooooooooooooooooooooooooongIiiiiiiiiideeeentifieeeeeeeeeeeeeeeeer, + ...superLoooooooooooooooooooooooooooooongListHere, +}