mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
* Added -u arg for command uniq. * Update uniq.rs Co-authored-by: JT <jonathandturner@users.noreply.github.com>
This commit is contained in:
@ -170,6 +170,26 @@ fn uniq_counting() {
|
||||
assert_eq!(actual.out, "1");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn uniq_unique() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
echo [1 2 3 4 1 5]
|
||||
| uniq --unique
|
||||
"#
|
||||
));
|
||||
let expected = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
echo [2 3 4 5]
|
||||
"#
|
||||
));
|
||||
print!("{}", actual.out);
|
||||
print!("{}", expected.out);
|
||||
assert_eq!(actual.out, expected.out);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn uniq_simple_vals_ints() {
|
||||
let actual = nu!(
|
||||
|
Reference in New Issue
Block a user