1
0
mirror of https://github.com/nushell/nushell.git synced 2025-07-15 05:45:10 +02:00
Files
.cargo
.github
assets
benches
crates
nu-cli
nu-color-config
nu-command
assets
proptest-regressions
src
tests
commands
assignment
date
hash_
math
move_
network
path
platform
query
random
bool.rs
chars.rs
decimal.rs
dice.rs
integer.rs
mod.rs
uuid.rs
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
do_.rs
drop.rs
each.rs
echo.rs
empty.rs
enter.rs
error_make.rs
every.rs
exec.rs
export_def.rs
fill.rs
find.rs
first.rs
flatten.rs
for_.rs
format.rs
g.rs
get.rs
glob.rs
group_by.rs
headers.rs
help.rs
histogram.rs
insert.rs
into_filesize.rs
into_int.rs
last.rs
length.rs
let_.rs
lines.rs
loop_.rs
ls.rs
merge.rs
mkdir.rs
mod.rs
mut_.rs
n.rs
nu_check.rs
open.rs
p.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
shells.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
build.rs
nu-engine
nu-explore
nu-glob
nu-json
nu-parser
nu-path
nu-plugin
nu-pretty-hex
nu-protocol
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
docs
images
pkg_mgrs
src
tests
wix
.gitignore
.typos.toml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Cargo.lock
Cargo.toml
Cross.toml
LICENSE
README.md
README.release.txt
build-all-maclin.sh
build-all-windows.cmd
build-all.nu
build.rs
codecov.yml
coverage-local.nu
coverage-local.sh
install-all.ps1
install-all.sh
register-plugins.nu
rust-toolchain.toml
uninstall-all.sh
nushell/crates/nu-command/tests/commands/random/chars.rs
Michael Angerman d06f457b2a nu-cli refactor moving commands into their own crate nu-command ()
* move commands, futures.rs, script.rs, utils

* move over maybe_print_errors

* add nu_command crate references to nu_cli

* in commands.rs open up to pub mod from pub(crate)

* nu-cli, nu-command, and nu tests are now passing

* cargo fmt

* clean up nu-cli/src/prelude.rs

* code cleanup

* for some reason lex.rs was not formatted, may be causing my error

* remove mod completion from lib.rs which was not being used along with quickcheck macros

* add in allow unused imports

* comment out one failing external test; comment out one failing internal test

* revert commenting out failing tests; something else might be going on; someone with a windows machine should check and see what is going on with these failing windows tests

* Update Cargo.toml

Extend the optional features to nu-command

Co-authored-by: Jonathan Turner <jonathandturner@users.noreply.github.com>
2021-01-12 17:59:53 +13:00

15 lines
278 B
Rust

use nu_test_support::{nu, pipeline};
#[test]
fn generates_chars_of_specified_length() {
let actual = nu!(
cwd: ".", pipeline(
r#"
random chars -l 15 | size | get chars
"#
));
let result = actual.out;
assert_eq!(result, "15");
}