about summary refs log tree commit diff
path: root/tvix/glue/src/tests/tvix_tests/eval-okay-toxml-context.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/glue/src/tests/tvix_tests/eval-okay-toxml-context.nix')
-rw-r--r--tvix/glue/src/tests/tvix_tests/eval-okay-toxml-context.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/tvix/glue/src/tests/tvix_tests/eval-okay-toxml-context.nix b/tvix/glue/src/tests/tvix_tests/eval-okay-toxml-context.nix
new file mode 100644
index 0000000000..933aa46022
--- /dev/null
+++ b/tvix/glue/src/tests/tvix_tests/eval-okay-toxml-context.nix
@@ -0,0 +1,14 @@
+[
+  # builtins.toXML retains context where there is.
+  (builtins.getContext (builtins.toXML {
+    inherit (derivation {
+      name = "test";
+      builder = "/bin/sh";
+      system = builtins.currentSystem;
+    }) drvPath;
+  }))
+
+  # this should have no context.
+  (builtins.hasContext
+    (builtins.toXML { }))
+]