diff options
author | William Carroll <wpcarro@gmail.com> | 2022-09-05T18·42-0700 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-09-19T00·57+0000 |
commit | fefa8c55c45d82fc1d81e02a96e126812e1e1223 (patch) | |
tree | f04180e2cc57ac61ba7aa2a663973789f0a64efa /tvix/eval/src/tests/tvix_tests | |
parent | 2fe18e44860ad97a88d488590c40cf610a274c1d (diff) |
feat(tvix/eval): Support builtins.tail r/4917
TL;DR: - support `builtins.tail` - define `ErrorKind::TailEmptyList` and canonical error code - support basic unit tests Unsure whether or not the error should be a dedicated `ErrorKind`... Change-Id: Iae90fda1bb21ce7bdb1aaa2aeb2b8c1e6dcb0f05 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6545 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests')
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-builtins-tail.exp | 1 | ||||
-rw-r--r-- | tvix/eval/src/tests/tvix_tests/eval-okay-builtins-tail.nix | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-tail.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-tail.exp new file mode 100644 index 000000000000..b9e3aa1ef79d --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-tail.exp @@ -0,0 +1 @@ +[ [ ] [ 2 3 ] ] diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-tail.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-tail.nix new file mode 100644 index 000000000000..2be9496a98e2 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-tail.nix @@ -0,0 +1,4 @@ +[ + (builtins.tail [ "foo" ]) + (builtins.tail [ 1 2 3 ]) +] |