From 457decb7905665879bd2acaf2c3807be98131bc0 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 14 Oct 2024 16:06:40 +0300 Subject: test(tvix/glue): add builtins.storeDir regression test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib87f41b3e0d634dd76e648acfe1b3026211f947a Reviewed-on: https://cl.tvl.fyi/c/depot/+/12619 Reviewed-by: Ilan Joselevich Autosubmit: flokli Reviewed-by: Jörg Thalheim Tested-by: BuildkiteCI --- tvix/glue/src/tests/dummy/.keep | 0 tvix/glue/src/tests/tvix_tests/eval-okay-storePath2.exp | 1 + tvix/glue/src/tests/tvix_tests/eval-okay-storePath2.nix | 8 ++++++++ 3 files changed, 9 insertions(+) create mode 100644 tvix/glue/src/tests/dummy/.keep create mode 100644 tvix/glue/src/tests/tvix_tests/eval-okay-storePath2.exp create mode 100644 tvix/glue/src/tests/tvix_tests/eval-okay-storePath2.nix diff --git a/tvix/glue/src/tests/dummy/.keep b/tvix/glue/src/tests/dummy/.keep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tvix/glue/src/tests/tvix_tests/eval-okay-storePath2.exp b/tvix/glue/src/tests/tvix_tests/eval-okay-storePath2.exp new file mode 100644 index 000000000000..26a467d2799d --- /dev/null +++ b/tvix/glue/src/tests/tvix_tests/eval-okay-storePath2.exp @@ -0,0 +1 @@ +{ plain = "/nix/store/vqsvbisgiqrqa1y0qljigq4ds5h38gym-dummy"; withSubPath = "/nix/store/vqsvbisgiqrqa1y0qljigq4ds5h38gym-dummy/.keep"; } diff --git a/tvix/glue/src/tests/tvix_tests/eval-okay-storePath2.nix b/tvix/glue/src/tests/tvix_tests/eval-okay-storePath2.nix new file mode 100644 index 000000000000..2d1fc45871f3 --- /dev/null +++ b/tvix/glue/src/tests/tvix_tests/eval-okay-storePath2.nix @@ -0,0 +1,8 @@ +let + path = builtins.unsafeDiscardStringContext "${../dummy}"; + storePath = builtins.storePath path; +in +{ + plain = builtins.storePath path; + withSubPath = builtins.storePath (path + "/.keep"); +} -- cgit 1.4.1