2021-03-15 08:26:30 +01:00
|
|
|
use nu_test_support::pipeline as input;
|
|
|
|
use nu_test_support::playground::{says, Playground};
|
|
|
|
|
|
|
|
use hamcrest2::assert_that;
|
|
|
|
use hamcrest2::prelude::*;
|
2019-12-15 17:15:06 +01:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn adds_a_row_to_the_end() {
|
2021-03-15 08:26:30 +01:00
|
|
|
Playground::setup("append_test_1", |_, nu| {
|
|
|
|
assert_that!(
|
|
|
|
nu.pipeline(&input(
|
|
|
|
r#"
|
|
|
|
echo [ "Andrés N. Robalino", "Jonathan Turner", "Yehuda Katz" ]
|
2020-01-10 16:44:24 +01:00
|
|
|
| append "pollo loco"
|
|
|
|
| nth 3
|
2021-03-15 08:26:30 +01:00
|
|
|
"#
|
|
|
|
)),
|
|
|
|
says().to_stdout("pollo loco")
|
|
|
|
);
|
2020-01-10 16:44:24 +01:00
|
|
|
})
|
2019-12-15 17:15:06 +01:00
|
|
|
}
|