2022-12-07 03:48:03 +01:00
|
|
|
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
|
|
|
|
"#
|
|
|
|
));
|
|
|
|
|
2023-01-04 06:08:05 +01:00
|
|
|
assert_eq!(actual.out, "list<float> (stream)");
|
2022-12-07 03:48:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn ints_in_seq_leads_to_lists_of_ints() {
|
|
|
|
let actual = nu!(
|
|
|
|
cwd: "tests/fixtures/formats", pipeline(
|
|
|
|
r#"
|
|
|
|
seq 1 2 6 | describe
|
|
|
|
"#
|
|
|
|
));
|
|
|
|
|
2023-01-04 06:08:05 +01:00
|
|
|
assert_eq!(actual.out, "list<int> (stream)");
|
2022-12-07 03:48:03 +01:00
|
|
|
}
|