about summary refs log tree commit diff
path: root/tvix/cli/tests/repl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/cli/tests/repl.rs')
-rw-r--r--tvix/cli/tests/repl.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tvix/cli/tests/repl.rs b/tvix/cli/tests/repl.rs
index a14f4bff7e6a..c6644330976e 100644
--- a/tvix/cli/tests/repl.rs
+++ b/tvix/cli/tests/repl.rs
@@ -53,6 +53,22 @@ test_repl!(bind_lazy() {
     "#]];
 });
 
+test_repl!(bind_lazy_errors() {
+    r#"x = (_: "x" + 1)"# => expect![[""]];
+    "x null" => expect![[""]];
+});
+
+test_repl!(bind_referencing_import() {
+    "six = import ./tests/six.nix {}" => expect![[""]];
+    "six.six" => expect![[r#"
+        => 6 :: int
+    "#]];
+    "imported = import ./tests/import.nix"  => expect![[""]];
+    "(imported {}).six" => expect![[r#"
+        => 6 :: int
+    "#]];
+});
+
 test_repl!(deep_print() {
     "builtins.map (x: x + 1) [ 1 2 3 ]" => expect![[r#"
         => [ <CODE> <CODE> <CODE> ] :: list