2020-07-18 03:59:23 +02:00
|
|
|
#[cfg(feature = "bson")]
|
2019-12-15 17:15:06 +01:00
|
|
|
#[test]
|
|
|
|
fn table_to_bson_and_back_into_table() {
|
2020-07-18 03:59:23 +02:00
|
|
|
use nu_test_support::{nu, pipeline};
|
2019-12-15 17:15:06 +01:00
|
|
|
let actual = nu!(
|
|
|
|
cwd: "tests/fixtures/formats", pipeline(
|
|
|
|
r#"
|
|
|
|
open sample.bson
|
2020-05-04 10:44:33 +02:00
|
|
|
| to bson
|
|
|
|
| from bson
|
2019-12-15 17:15:06 +01:00
|
|
|
| get root
|
|
|
|
| get 1.b
|
|
|
|
"#
|
|
|
|
));
|
|
|
|
|
2020-05-07 13:03:43 +02:00
|
|
|
assert_eq!(actual.out, "whel");
|
2019-12-15 17:15:06 +01:00
|
|
|
}
|