From 649a0427e862c67272bb81cd94df59ac491d2d51 Mon Sep 17 00:00:00 2001 From: NonlinearFruit <1123benji5813@gmail.com> Date: Sat, 4 May 2024 12:30:33 -0600 Subject: [PATCH] Verify that closures work --- test-spec.nu | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test-spec.nu b/test-spec.nu index 9d86b3c..e0c49b5 100644 --- a/test-spec.nu +++ b/test-spec.nu @@ -198,3 +198,14 @@ export def "test nested list is gron-able" [] { assert equal '[0].[0]' ($result.2.key) } +export def "test closures are gracefully handled" [] { + use std assert + use gron.nu + let nuon = {|x| x + 1 } + + let result = gron $nuon + + assert equal null ($result.0.key?) + assert equal closure ($result.0.value | describe) +} +