about summary refs log tree commit diff
path: root/tvix/glue/src/tests/tvix_tests/eval-okay-context-introspection.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/glue/src/tests/tvix_tests/eval-okay-context-introspection.nix')
-rw-r--r--tvix/glue/src/tests/tvix_tests/eval-okay-context-introspection.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/tvix/glue/src/tests/tvix_tests/eval-okay-context-introspection.nix b/tvix/glue/src/tests/tvix_tests/eval-okay-context-introspection.nix
index 1b645b1a2607..ecd8ab0073d0 100644
--- a/tvix/glue/src/tests/tvix_tests/eval-okay-context-introspection.nix
+++ b/tvix/glue/src/tests/tvix_tests/eval-okay-context-introspection.nix
@@ -41,6 +41,13 @@ let
   reconstructed-path = appendContextFrom combo-path
     (builtins.unsafeDiscardStringContext combo-path);
 
+  an-str = {
+    a = "${drv}";
+  };
+  an-list = {
+    b = [ drv ];
+  };
+
   # Eta rule for strings with context.
   etaRule = str:
     str == appendContextFrom
@@ -70,4 +77,7 @@ in
   (etaRule "foo")
   (etaRule drv.drvPath)
   (etaRule drv.foo.outPath)
+  # `toJSON` tests
+  (builtins.hasContext (builtins.toJSON an-str))
+  (builtins.hasContext (builtins.toJSON an-list))
 ]