2020-01-07 07:35:00 +01:00
|
|
|
use nu_test_support::{nu, pipeline};
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn from_ods_file_to_table() {
|
|
|
|
let actual = nu!(
|
|
|
|
cwd: "tests/fixtures/formats", pipeline(
|
|
|
|
r#"
|
|
|
|
open sample_data.ods
|
|
|
|
| get SalesOrders
|
|
|
|
| nth 4
|
|
|
|
| get Column2
|
|
|
|
"#
|
|
|
|
));
|
|
|
|
|
2020-05-07 13:03:43 +02:00
|
|
|
assert_eq!(actual.out, "Gill");
|
2020-01-07 07:35:00 +01:00
|
|
|
}
|
2021-06-10 14:44:24 +02:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn from_ods_file_to_table_select_sheet() {
|
|
|
|
let actual = nu!(
|
|
|
|
cwd: "tests/fixtures/formats", pipeline(
|
|
|
|
r#"
|
|
|
|
open sample_data.ods --raw
|
|
|
|
| from ods -s ["SalesOrders"]
|
|
|
|
| get
|
|
|
|
"#
|
|
|
|
));
|
|
|
|
|
|
|
|
assert_eq!(actual.out, "SalesOrders");
|
|
|
|
}
|