From 26acc2e636245d307c99201de6891da54ac1dbc5 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 27 Aug 2022 02:23:04 +0300 Subject: test(tvix/eval): add tests for very simple closures Change-Id: Ib8287ade4d5df6d29e1812fb2d349cee5d92ca6a Reviewed-on: https://cl.tvl.fyi/c/depot/+/6296 Tested-by: BuildkiteCI Reviewed-by: sterni --- tvix/eval/src/tests/tvix_tests/eval-okay-nested-closure.exp | 1 + tvix/eval/src/tests/tvix_tests/eval-okay-nested-closure.nix | 1 + tvix/eval/src/tests/tvix_tests/eval-okay-simple-closure.exp | 1 + tvix/eval/src/tests/tvix_tests/eval-okay-simple-closure.nix | 1 + 4 files changed, 4 insertions(+) create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-nested-closure.exp create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-nested-closure.nix create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-simple-closure.exp create mode 100644 tvix/eval/src/tests/tvix_tests/eval-okay-simple-closure.nix (limited to 'tvix') diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-nested-closure.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-closure.exp new file mode 100644 index 000000000000..b6a7d89c68e0 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-closure.exp @@ -0,0 +1 @@ +16 diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-nested-closure.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-closure.nix new file mode 100644 index 000000000000..97bff7f07758 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-nested-closure.nix @@ -0,0 +1 @@ +(a: b: c: d: a + b + c + d) 1 3 5 7 diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-simple-closure.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-simple-closure.exp new file mode 100644 index 000000000000..7f8f011eb73d --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-simple-closure.exp @@ -0,0 +1 @@ +7 diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-simple-closure.nix b/tvix/eval/src/tests/tvix_tests/eval-okay-simple-closure.nix new file mode 100644 index 000000000000..56445454fec7 --- /dev/null +++ b/tvix/eval/src/tests/tvix_tests/eval-okay-simple-closure.nix @@ -0,0 +1 @@ +(a: b: a + b) 2 5 -- cgit 1.4.1