From 841a63f6fbc318aa9f020bd01bc6f1666c9c2690 Mon Sep 17 00:00:00 2001 From: cosineblast <55855728+cosineblast@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:44:49 -0300 Subject: [PATCH] Update error message test for split-by The now deprecated split-by command produces different error messages depending on whether the input is a value or a stream. The `errors_if_non_record_input` test used to check whether the error message produced was the one produced when the input is a value. This commit updates this test so that is also accepts the error message produced when the input is a stream. --- crates/nu-command/tests/commands/split_by.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/nu-command/tests/commands/split_by.rs b/crates/nu-command/tests/commands/split_by.rs index ab4631d079..1f648a1fcf 100644 --- a/crates/nu-command/tests/commands/split_by.rs +++ b/crates/nu-command/tests/commands/split_by.rs @@ -56,8 +56,11 @@ fn errors_if_non_record_input() { " )); - assert!(only_supports - .err - .contains("only Record input data is supported")); + assert!( + only_supports + .err + .contains("only Record input data is supported") + || only_supports.err.contains("expected: record") + ); }) }