forked from extern/nushell
Fix "occurrences" typo in histrogram test file
This commit is contained in:
parent
3dc95ef765
commit
d1d98a897a
@ -54,7 +54,7 @@ fn summarizes_by_values() {
|
|||||||
| get rusty_at
|
| get rusty_at
|
||||||
| histogram
|
| histogram
|
||||||
| where value == "Estados Unidos"
|
| where value == "Estados Unidos"
|
||||||
| get ocurrences
|
| get occurrences
|
||||||
| echo $it
|
| echo $it
|
||||||
"#
|
"#
|
||||||
));
|
));
|
||||||
@ -93,20 +93,20 @@ fn help() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn ocurrences() {
|
fn occurrences() {
|
||||||
let actual = nu!(
|
let actual = nu!(
|
||||||
cwd: ".", pipeline(
|
cwd: ".", pipeline(
|
||||||
r#"
|
r#"
|
||||||
echo "[{"bit":1},{"bit":0},{"bit":0},{"bit":0},{"bit":0},{"bit":0},{"bit":0},{"bit":1}]"
|
echo "[{"bit":1},{"bit":0},{"bit":0},{"bit":0},{"bit":0},{"bit":0},{"bit":0},{"bit":1}]"
|
||||||
| from json
|
| from json
|
||||||
| histogram bit
|
| histogram bit
|
||||||
| sort-by ocurrences
|
| sort-by occurrences
|
||||||
| reject frequency
|
| reject frequency
|
||||||
| to json
|
| to json
|
||||||
"#
|
"#
|
||||||
));
|
));
|
||||||
|
|
||||||
let bit_json = r#"[{"bit":"1","ocurrences":2,"percentage":"33.33%"},{"bit":"0","ocurrences":6,"percentage":"100.00%"}]"#;
|
let bit_json = r#"[{"bit":"1","occurrences":2,"percentage":"33.33%"},{"bit":"0","occurrences":6,"percentage":"100.00%"}]"#;
|
||||||
|
|
||||||
assert_eq!(actual.out, bit_json);
|
assert_eq!(actual.out, bit_json);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user