engine-q merge

This commit is contained in:
Fernando Herrera
2022-02-07 19:11:34 +00:00
1965 changed files with 119062 additions and 20 deletions

View File

@ -1,10 +1,15 @@
use nu_test_support::fs::{AbsolutePath, DisplayPath, Stub::FileWithContent};
use nu_test_support::nu;
<<<<<<< HEAD
use nu_test_support::pipeline as input;
use nu_test_support::playground::{says, Playground};
use hamcrest2::assert_that;
use hamcrest2::prelude::*;
=======
use nu_test_support::pipeline;
use nu_test_support::playground::Playground;
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
#[should_panic]
#[test]
@ -40,6 +45,7 @@ fn sources_also_files_under_custom_lib_dirs_path() {
"#,
)]);
<<<<<<< HEAD
assert_that!(
nu.pipeline(&input(
r#"
@ -50,6 +56,18 @@ fn sources_also_files_under_custom_lib_dirs_path() {
)),
says().stdout("hello nu")
);
=======
let actual = nu!(
cwd: ".", pipeline(
r#"
source my_library.nu ;
hello
"#
));
assert_eq!(actual.out, "hello nu");
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
})
}
@ -104,6 +122,11 @@ fn try_source_foo_without_quotes_in(testdir: &str, playdir: &str) {
});
}
<<<<<<< HEAD
=======
// FIXME: jt: needs more work
#[ignore]
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
#[test]
fn sources_unicode_file_in_normal_dir() {
try_source_foo_with_single_quotes_in("foo", "source_test_1");
@ -111,6 +134,11 @@ fn sources_unicode_file_in_normal_dir() {
try_source_foo_without_quotes_in("foo", "source_test_3");
}
<<<<<<< HEAD
=======
// FIXME: jt: needs more work
#[ignore]
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
#[test]
fn sources_unicode_file_in_unicode_dir_without_spaces_1() {
try_source_foo_with_single_quotes_in("🚒", "source_test_4");
@ -118,6 +146,11 @@ fn sources_unicode_file_in_unicode_dir_without_spaces_1() {
try_source_foo_without_quotes_in("🚒", "source_test_6");
}
<<<<<<< HEAD
=======
// FIXME: jt: needs more work
#[ignore]
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
#[cfg(not(windows))] // ':' is not allowed in Windows paths
#[test]
fn sources_unicode_file_in_unicode_dir_without_spaces_2() {
@ -126,12 +159,22 @@ fn sources_unicode_file_in_unicode_dir_without_spaces_2() {
try_source_foo_without_quotes_in(":fire_engine:", "source_test_9");
}
<<<<<<< HEAD
=======
// FIXME: jt: needs more work
#[ignore]
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
#[test]
fn sources_unicode_file_in_unicode_dir_with_spaces_1() {
try_source_foo_with_single_quotes_in("e-$ èрт🚒♞中片-j", "source_test_8");
try_source_foo_with_double_quotes_in("e-$ èрт🚒♞中片-j", "source_test_9");
}
<<<<<<< HEAD
=======
// FIXME: jt: needs more work
#[ignore]
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
#[cfg(not(windows))] // ':' is not allowed in Windows paths
#[test]
fn sources_unicode_file_in_unicode_dir_with_spaces_2() {