From 1125b6b7b7eda5d519977ce817149530aceba20a Mon Sep 17 00:00:00 2001 From: sterni Date: Wed, 14 Jun 2023 15:19:42 +0200 Subject: test(tvix/eval): add test case for builtins set pointer equality Unsupported by Tvix at the moment. Documents b/280. Change-Id: I48844feeefa9da8ed7e5d85300d52bb5650f82d2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8772 Reviewed-by: tazjin Tested-by: BuildkiteCI Autosubmit: sterni --- .../eval-okay-builtins-set-pointer-equality.exp | 1 + .../eval-okay-builtins-set-pointer-equality.nix | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-builtins-set-pointer-equality.exp create mode 100644 tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-builtins-set-pointer-equality.nix (limited to 'tvix/eval') diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-builtins-set-pointer-equality.exp b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-builtins-set-pointer-equality.exp new file mode 100644 index 000000000000..eb05f4caf03b --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-builtins-set-pointer-equality.exp @@ -0,0 +1 @@ +[ true true true true true true true true false false true ] diff --git a/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-builtins-set-pointer-equality.nix b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-builtins-set-pointer-equality.nix new file mode 100644 index 000000000000..678d6139ee03 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/notyetpassing/eval-okay-builtins-set-pointer-equality.nix @@ -0,0 +1,20 @@ +let + alias = builtins; +in + +[ + (builtins == builtins) + (alias == builtins) + (builtins == builtins.builtins) + (builtins.builtins == builtins.builtins) + (builtins.builtins == builtins.builtins.builtins) + (alias == alias) + (alias == builtins.builtins) + ([ builtins ] == [ builtins ]) + + # Surprisingly this only works with the set + ([ builtins.add ] == [ builtins.add ]) + ({ inherit (builtins) import; } == { inherit (builtins) import; }) + # But this does + (let x = { inherit (builtins) add; }; in x == x) +] -- cgit 1.4.1