2022-02-07 19:11:34 +00:00
|
|
|
<<<<<<< HEAD
|
2021-03-15 07:26:30 +00: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 16:15:06 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn adds_a_row_to_the_end() {
|
2021-03-15 07:26:30 +00: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 15:44:24 +00:00
|
|
|
| append "pollo loco"
|
|
|
|
| nth 3
|
2021-03-15 07:26:30 +00:00
|
|
|
"#
|
|
|
|
)),
|
2021-06-17 19:59:58 +00:00
|
|
|
says().stdout("pollo loco")
|
2021-03-15 07:26:30 +00:00
|
|
|
);
|
2020-01-10 15:44:24 +00:00
|
|
|
})
|
2022-02-07 19:11:34 +00:00
|
|
|
=======
|
2022-02-04 02:01:45 +00:00
|
|
|
use nu_test_support::{nu, pipeline};
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn adds_a_row_to_the_end() {
|
|
|
|
let actual = nu!(
|
|
|
|
cwd: ".", pipeline(
|
|
|
|
r#"
|
|
|
|
echo [ "Andrés N. Robalino", "Jonathan Turner", "Yehuda Katz" ]
|
|
|
|
| append "pollo loco"
|
|
|
|
| nth 3
|
|
|
|
"#
|
|
|
|
));
|
|
|
|
|
|
|
|
assert_eq!(actual.out, "pollo loco");
|
2022-02-07 19:11:34 +00:00
|
|
|
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
|
2019-12-15 16:15:06 +00:00
|
|
|
}
|