-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description Title. # User-Facing Changes Faster seq that works better with functions that take in `ListStream`s. # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date.
- Loading branch information
1 parent
df66d9f
commit 3395bea
Showing
3 changed files
with
110 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,7 @@ mod run_external; | |
mod save; | ||
mod select; | ||
mod semicolon; | ||
mod seq; | ||
mod seq_char; | ||
mod shells; | ||
mod skip; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use nu_test_support::{nu, pipeline}; | ||
|
||
#[test] | ||
fn float_in_seq_leads_to_lists_of_floats() { | ||
let actual = nu!( | ||
cwd: "tests/fixtures/formats", pipeline( | ||
r#" | ||
seq 1.0 0.5 6 | describe | ||
"# | ||
)); | ||
|
||
assert_eq!(actual.out, "list<float>"); | ||
} | ||
|
||
#[test] | ||
fn ints_in_seq_leads_to_lists_of_ints() { | ||
let actual = nu!( | ||
cwd: "tests/fixtures/formats", pipeline( | ||
r#" | ||
seq 1 2 6 | describe | ||
"# | ||
)); | ||
|
||
assert_eq!(actual.out, "list<int>"); | ||
} |