mirror of
https://github.com/nushell/nushell.git
synced 2025-07-08 02:17:22 +02:00
.cargo
.githooks
.github
assets
benches
crates
nu-cli
nu-cmd-base
nu-cmd-dataframe
nu-cmd-extra
nu-cmd-lang
nu-color-config
nu-command
src
tests
commands
assignment
date
hash_
math
move_
network
path
platform
query
random
skip
str_
take
url
alias.rs
all.rs
any.rs
append.rs
break_.rs
cal.rs
cd.rs
compact.rs
continue_.rs
cp.rs
def.rs
default.rs
detect_columns.rs
do_.rs
drop.rs
each.rs
echo.rs
empty.rs
error_make.rs
every.rs
exec.rs
export_def.rs
fill.rs
find.rs
first.rs
flatten.rs
for_.rs
format.rs
get.rs
glob.rs
group_by.rs
headers.rs
help.rs
histogram.rs
insert.rs
inspect.rs
into_datetime.rs
into_filesize.rs
into_int.rs
join.rs
last.rs
length.rs
let_.rs
lines.rs
loop_.rs
ls.rs
match_.rs
merge.rs
mkdir.rs
mod.rs
mut_.rs
nu_check.rs
open.rs
par_each.rs
parse.rs
prepend.rs
print.rs
range.rs
redirection.rs
reduce.rs
reject.rs
rename.rs
return_.rs
reverse.rs
rm.rs
roll.rs
rotate.rs
run_external.rs
save.rs
select.rs
semicolon.rs
seq.rs
seq_char.rs
sort.rs
sort_by.rs
source_env.rs
split_by.rs
split_column.rs
split_row.rs
table.rs
to_text.rs
touch.rs
transpose.rs
try_.rs
uniq.rs
uniq_by.rs
update.rs
upsert.rs
use_.rs
where_.rs
which.rs
while_.rs
with_env.rs
wrap.rs
zip.rs
format_conversions
main.rs
Cargo.toml
LICENSE
nu-engine
nu-explore
nu-glob
nu-json
nu-parser
nu-path
nu-plugin
nu-pretty-hex
nu-protocol
nu-std
nu-system
nu-table
nu-term-grid
nu-test-support
nu-utils
nu_plugin_custom_values
nu_plugin_example
nu_plugin_formats
nu_plugin_gstat
nu_plugin_inc
nu_plugin_python
nu_plugin_query
README.md
docker
scripts
src
tests
wix
.gitattributes
.gitignore
.typos.toml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Cargo.lock
Cargo.toml
Cross.toml
LICENSE
README.md
codecov.yml
rust-toolchain.toml
toolkit.nu
# Description The working directory doesn't have to be set for those tests (or would be the default anyways). When appropriate also remove calls to the `pipeline()` function. In most places kept the diff minimal and only removed the superfluous part to not pollute the blame view. With simpler tests also simplified things to make them more readable overall (this included removal of the raw string literal). Work for #8670
19 lines
382 B
Rust
19 lines
382 B
Rust
use nu_test_support::nu;
|
|
|
|
#[test]
|
|
fn can_get_reverse_first() {
|
|
let actual = nu!(
|
|
cwd: "tests/fixtures/formats",
|
|
"ls | sort-by name | reverse | first | get name | str trim "
|
|
);
|
|
|
|
assert_eq!(actual.out, "utf16.ini");
|
|
}
|
|
|
|
#[test]
|
|
fn fail_on_non_iterator() {
|
|
let actual = nu!("1 | reverse");
|
|
|
|
assert!(actual.err.contains("command doesn't support"));
|
|
}
|