From 168e7f7b16fb4de1e9ecb95dc40d7ed974a958d4 Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Wed, 5 Jul 2023 13:19:54 +0200 Subject: [PATCH] Document `fn pipeline()` used with `nu!` tests (#9609) # Description Its purpose and its limitation around statements are not too obvious but ubiquituous in our `nu!` tests. Document its behavior as we remove it in many places for #8670 # User-Facing Changes None --- crates/nu-test-support/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/nu-test-support/src/lib.rs b/crates/nu-test-support/src/lib.rs index 5f95efbab..37e78f8f0 100644 --- a/crates/nu-test-support/src/lib.rs +++ b/crates/nu-test-support/src/lib.rs @@ -27,6 +27,9 @@ impl Outcome { } } +/// Reformat a multiline pipeline into a single line for use with `nu -c` +/// +/// Warning: Will not correctly handle statements that are not `;` separated! pub fn pipeline(commands: &str) -> String { commands .trim()