nushell/crates/nu-command/tests/commands/mod.rs
Kyle Anderson 1572808adb
Filter out empty glob patterns to "glob" command (#6707)
* Filter out empty glob patterns

An empty argument to the "glob" command will now produce an empty result.
Working towards nushell/nushell#6653.

* Run `cargo fmt --all`

Just autoformatted the repo so that CI passes and we have a consistent code
format across modules.

* Treat empty glob argument as error

The glob command will now report an empty string argument as an error instead
of silently ignoring it.

See https://github.com/nushell/nushell/pull/6707#discussion_r993345013.

* Add tests for glob command

Two small tests for the glob command, one to check that the empty string errors
it, and another to sanity check the '*' glob, have been added.

* Rename glob sanity check star test

Co-authored-by: Kyle Anderson <kyle.anderson@uwaterloo.ca>
2022-10-15 18:00:38 +02:00

92 lines
1.1 KiB
Rust

mod alias;
mod all;
mod any;
mod append;
mod cal;
mod cd;
mod compact;
mod cp;
mod date;
mod def;
mod default;
mod do_;
mod drop;
mod each;
mod echo;
mod empty;
mod enter;
mod error_make;
mod every;
mod export_def;
mod find;
mod first;
mod flatten;
mod format;
mod g;
mod get;
mod glob;
mod group_by;
mod hash_;
mod headers;
mod help;
mod histogram;
mod insert;
mod into_filesize;
mod into_int;
mod last;
mod length;
mod let_;
mod lines;
mod ls;
mod math;
mod merge;
mod mkdir;
mod move_;
mod n;
mod network;
mod nu_check;
mod open;
mod p;
mod parse;
mod path;
mod platform;
mod prepend;
mod print;
#[cfg(feature = "database")]
mod query;
mod random;
mod range;
mod reduce;
mod reject;
mod rename;
mod reverse;
mod rm;
mod roll;
mod rotate;
mod run_external;
mod save;
mod select;
mod semicolon;
mod shells;
mod skip;
mod sort_by;
mod source_env;
mod split_by;
mod split_column;
mod split_row;
mod str_;
mod table;
mod take;
mod touch;
mod transpose;
mod uniq;
mod update;
mod upsert;
mod use_;
mod where_;
#[cfg(feature = "which-support")]
mod which;
mod with_env;
mod wrap;
mod zip;