From e834a2cbc47cf18d5f35bb258ccc754c54c4f4e1 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Mon, 5 Sep 2022 11:43:17 -0700 Subject: feat(tvix/eval): Support builtins.attrNames Define `.len()` method on `NixAttrs` to preallocate the capacity of the result vector. Also anchor an errant comment to its context (I think). Change-Id: I268f15025d453d7b3ae1146558c80e51433dd2a8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6546 Reviewed-by: wpcarro Reviewed-by: sterni Autosubmit: wpcarro Tested-by: BuildkiteCI --- tvix/eval/src/tests/tvix_tests/eval-okay-builtins-attrnames.exp | 1 + 1 file changed, 1 insertion(+) create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-builtins-attrnames.exp (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-builtins-attrnames.exp') diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-attrnames.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-attrnames.exp new file mode 100644 index 0000000000..6521066a8e --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-attrnames.exp @@ -0,0 +1 @@ +[ [ ] [ "bar" "baz" "foo" ] [ "Baz" "Foo" "bar" ] [ "Eric Idle" "Graham Chapman" "John Cleese" "Michael Palin" "Terry Gilliam" "Terry Jones" ] ] -- cgit 1.4.1