mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Add reduce command (#700)
* Add reduce command * Fix example and missing test commands * Add forgotten file
This commit is contained in:
@ -12,7 +12,10 @@ use nu_protocol::{
|
||||
use crate::To;
|
||||
|
||||
#[cfg(test)]
|
||||
use super::{Ansi, Date, From, Into, Math, Path, Random, Split, Str, StrCollect, Url};
|
||||
use super::{
|
||||
Ansi, Date, From, If, Into, Math, Path, Random, Split, Str, StrCollect, StrFindReplace,
|
||||
StrLength, Url,
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn test_examples(cmd: impl Command + 'static) {
|
||||
@ -27,8 +30,11 @@ pub fn test_examples(cmd: impl Command + 'static) {
|
||||
let mut working_set = StateWorkingSet::new(&*engine_state);
|
||||
working_set.add_decl(Box::new(Str));
|
||||
working_set.add_decl(Box::new(StrCollect));
|
||||
working_set.add_decl(Box::new(StrLength));
|
||||
working_set.add_decl(Box::new(StrFindReplace));
|
||||
working_set.add_decl(Box::new(BuildString));
|
||||
working_set.add_decl(Box::new(From));
|
||||
working_set.add_decl(Box::new(If));
|
||||
working_set.add_decl(Box::new(To));
|
||||
working_set.add_decl(Box::new(Into));
|
||||
working_set.add_decl(Box::new(Random));
|
||||
|
Reference in New Issue
Block a user