Remove old nushell/merge engine-q

This commit is contained in:
JT
2022-02-07 14:54:06 -05:00
parent 10c4c50f1f
commit d70d91e559
430 changed files with 14543 additions and 7865 deletions

View File

@ -8,11 +8,7 @@ fn shows_error_for_command_not_found() {
"ferris_is_not_here.exe"
);
<<<<<<< HEAD
assert!(actual.err.contains("Command not found"));
=======
assert!(!actual.err.is_empty());
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
}
#[cfg(feature = "which")]
@ -23,16 +19,10 @@ fn shows_error_for_command_not_found_in_pipeline() {
"ferris_is_not_here.exe | echo done"
);
<<<<<<< HEAD
assert!(actual.err.contains("Command not found"));
}
=======
assert!(!actual.err.is_empty());
}
#[ignore] // jt: we can't test this using the -c workaround currently
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
#[cfg(feature = "which")]
#[test]
fn automatically_change_directory() {
@ -53,11 +43,8 @@ fn automatically_change_directory() {
})
}
<<<<<<< HEAD
=======
// FIXME: jt: we don't currently support autocd in testing
#[ignore]
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
#[test]
fn automatically_change_directory_with_trailing_slash_and_same_name_as_command() {
use nu_test_support::playground::Playground;
@ -89,29 +76,18 @@ fn execute_binary_in_string() {
let actual = nu!(
cwd: ".",
r#"
<<<<<<< HEAD
let cmd = echo
^$"($cmd)" '$0'
=======
let cmd = "echo"
^$"($cmd)" "$0"
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
"#);
assert_eq!(actual.out, "$0");
}
<<<<<<< HEAD
#[test]
fn redirects_custom_command_external() {
let actual = nu!(cwd: ".", r#"def foo [] { nu --testbin cococo foo bar }; foo | str length "#);
=======
//FIXME: jt - this is blocked on https://github.com/nushell/engine-q/issues/875
#[ignore]
#[test]
fn redirects_custom_command_external() {
let actual = nu!(cwd: ".", r#"def foo [] { nu --testbin cococo foo bar }; foo | str length"#);
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
assert_eq!(actual.out, "8");
}
@ -136,11 +112,7 @@ mod it_evaluation {
| sort-by name
| get name
| each { nu --testbin cococo $it | lines }
<<<<<<< HEAD
| nth 1
=======
| get 1
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
"#
));
@ -165,11 +137,7 @@ mod it_evaluation {
open nu_candies.txt
| lines
| each { nu --testbin chop $it | lines}
<<<<<<< HEAD
| nth 1
=======
| get 1
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
"#
));
@ -202,11 +170,7 @@ mod it_evaluation {
cwd: dirs.test(), pipeline(
r#"
open sample.toml
<<<<<<< HEAD
| each { nu --testbin cococo $it.nu_party_venue }
=======
| nu --testbin cococo $in.nu_party_venue
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
"#
));
@ -224,41 +188,25 @@ mod stdin_evaluation {
let actual = nu!(
cwd: ".",
pipeline(r#"
<<<<<<< HEAD
nu --testbin nonu "where's the nuline?"
| length
=======
nu --testbin nonu "wheres the nuline?" | length
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
"#
));
assert_eq!(actual.err, "");
}
<<<<<<< HEAD
=======
// FIXME: JT: `lines` doesn't currently support this kind of streaming
#[ignore]
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
#[test]
fn does_not_block_indefinitely() {
let stdout = nu!(
cwd: ".",
pipeline(r#"
<<<<<<< HEAD
nu --testbin iecho yes
| nu --testbin chop
| nu --testbin chop
| lines
| first 1
=======
( nu --testbin iecho yes
| nu --testbin chop
| nu --testbin chop
| lines
| first 1 )
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
"#
))
.out;
@ -280,11 +228,8 @@ mod external_words {
assert_eq!(actual.out, "joturner@foo.bar.baz");
}
<<<<<<< HEAD
=======
//FIXME: jt: limitation in testing - can't use single ticks currently
#[ignore]
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
#[test]
fn no_escaping_for_single_quoted_strings() {
let actual = nu!(cwd: ".", r#"
@ -297,12 +242,8 @@ mod external_words {
#[rstest::rstest]
#[case("sample.toml", r#""sample.toml""#)]
#[case("a sample file.toml", r#""a sample file.toml""#)]
<<<<<<< HEAD
#[case("quote'mark.toml", r#""quote'mark.toml""#)]
=======
//FIXME: jt: we don't currently support single ticks in tests
//#[case("quote'mark.toml", r#""quote'mark.toml""#)]
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
#[cfg_attr(
not(target_os = "windows"),
case(r#"quote"mark.toml"#, r#"$"quote(char double_quote)mark.toml""#)
@ -456,28 +397,16 @@ mod external_command_arguments {
|dirs, sandbox| {
sandbox.mkdir("cd");
<<<<<<< HEAD
sandbox.with_files(vec![EmptyFile("cd/jonathan_likes_cake.txt")]);
=======
sandbox.with_files(vec![EmptyFile("cd/jt_likes_cake.txt")]);
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
let actual = nu!(
cwd: dirs.test(), pipeline(
r#"
<<<<<<< HEAD
^ls $"(pwd)/cd"
"#
));
assert_eq!(actual.out, "jonathan_likes_cake.txt");
=======
nu --testbin cococo $"(pwd)/cd"
"#
));
assert!(actual.out.contains("cd"));
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
},
)
}
@ -508,13 +437,8 @@ mod external_command_arguments {
#[test]
fn subcommands_are_sanitized_before_passing_to_subshell() {
let actual = nu!(
<<<<<<< HEAD
cwd: ",",
"^echo \"$(ls)\""
=======
cwd: ".",
"nu --testbin cococo \"$(ls)\""
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
);
assert_eq!(actual.out, "$(ls)");
@ -524,13 +448,8 @@ mod external_command_arguments {
#[test]
fn shell_arguments_are_sanitized_even_if_coming_from_other_commands() {
let actual = nu!(
<<<<<<< HEAD
cwd: ",",
"^echo (echo \"a;&$(hello)\")"
=======
cwd: ".",
"nu --testbin cococo (echo \"a;&$(hello)\")"
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
);
assert_eq!(actual.out, "a;&$(hello)");