From 2557a99e87c9db5d517cd41108d74dd1b6744316 Mon Sep 17 00:00:00 2001 From: Firegem Date: Sun, 4 May 2025 17:36:47 -0400 Subject: [PATCH] fix example tests to include `upsert` command --- crates/nu-command/src/filters/default.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/nu-command/src/filters/default.rs b/crates/nu-command/src/filters/default.rs index c58838b32c..c17a2571ed 100644 --- a/crates/nu-command/src/filters/default.rs +++ b/crates/nu-command/src/filters/default.rs @@ -108,7 +108,7 @@ impl Command for Default { }, Example { description: r#"Fill missing column values based on other columns"#, - example: "[{a:1 b:2} {b:1}] | upsert a {|rc| default { $rc.b + 1 } }", + example: r#"[{a:1 b:2} {b:1}] | upsert a {|rc| default { $rc.b + 1 } }"#, result: Some(Value::test_list(vec![ Value::test_record(record! { "a" => Value::test_int(1), @@ -203,12 +203,14 @@ fn default( #[cfg(test)] mod test { + use crate::Upsert; + use super::*; #[test] fn test_examples() { - use crate::test_examples; + use crate::test_examples_with_commands; - test_examples(Default {}) + test_examples_with_commands(Default {}, &[&Upsert]); } }