about summary refs log tree commit diff
path: root/tvix/eval/builtin-macros/tests/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/builtin-macros/tests/tests.rs')
-rw-r--r--tvix/eval/builtin-macros/tests/tests.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tvix/eval/builtin-macros/tests/tests.rs b/tvix/eval/builtin-macros/tests/tests.rs
index d07020f69bb7..b270594b0f33 100644
--- a/tvix/eval/builtin-macros/tests/tests.rs
+++ b/tvix/eval/builtin-macros/tests/tests.rs
@@ -7,6 +7,7 @@ mod builtins {
     use tvix_eval::internal::VM;
     use tvix_eval::{ErrorKind, Value};
 
+    /// Test docstring
     #[builtin("identity")]
     pub fn builtin_identity(_vm: &mut VM, x: Value) -> Result<Value, ErrorKind> {
         Ok(x)
@@ -22,4 +23,7 @@ mod builtins {
 fn builtins() {
     let builtins = builtins::builtins();
     assert_eq!(builtins.len(), 2);
+
+    let identity = builtins.iter().find(|b| b.name() == "identity").unwrap();
+    assert_eq!(identity.documentation(), Some(" Test docstring"));
 }