Skip to content

Commit

Permalink
Verify that closures work
Browse files Browse the repository at this point in the history
  • Loading branch information
NonlinearFruit committed May 4, 2024
1 parent 0bfa164 commit 649a042
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test-spec.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 649a042

Please sign in to comment.