From 0888a6dfb0eb7004b481cd6f69756f6ce9c75025 Mon Sep 17 00:00:00 2001 From: sogaiu <33044872+sogaiu@users.noreply.github.com> Date: Sat, 15 Aug 2026 17:05:01 +0000 Subject: [PATCH] Add tests for partition-by (#1795) Co-authored-by: sogaiu <983021772@users.noreply.github.com> Co-authored-by: Calvin Rose --- test/suite-boot.janet | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/suite-boot.janet b/test/suite-boot.janet index b305e091..d905b724 100644 --- a/test/suite-boot.janet +++ b/test/suite-boot.janet @@ -1040,6 +1040,11 @@ (assert (deep= (frequencies (coro (yield 1) (yield 8) (yield 2) (yield 8))) @{1 1 2 1 8 2})) +# partition-by +(assert (deep= (partition-by even? "hello") + @[@[104] @[101] @[108 108] @[111]])) +(assert (deep= (partition-by keyword? [:a "b" 'c :d]) + @[@[:a] @["b" 'c] @[:d]])) # update (assert (deep= (update @"hello" 0 (fn [old delta] (+ old delta)) 17) @"yello"))