mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
@ -338,32 +338,6 @@ fn valuesystem_change_current_path_to_parent_path() {
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn valuesystem_change_to_home_directory() {
|
||||
Playground::setup("cd_test_14", |dirs, sandbox| {
|
||||
sandbox.with_files(vec![FileWithContent(
|
||||
"sample.toml",
|
||||
r#"
|
||||
[paquete]
|
||||
el = "pollo loco"
|
||||
"#,
|
||||
)]);
|
||||
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(),
|
||||
r#"
|
||||
enter sample.toml
|
||||
cd paquete
|
||||
cd ~
|
||||
pwd | echo $it
|
||||
exit
|
||||
"#
|
||||
);
|
||||
|
||||
assert_eq!(PathBuf::from(actual), PathBuf::from("/"));
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn valuesystem_change_to_a_path_containing_spaces() {
|
||||
Playground::setup("cd_test_15", |dirs, sandbox| {
|
||||
|
@ -37,5 +37,5 @@ fn sort_primitive_values() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "authors = [\"Yehuda Katz <wycats@gmail.com>\"]");
|
||||
assert_eq!(actual, "authors = [\"The Nu Project Contributors\"]");
|
||||
}
|
||||
|
@ -6,19 +6,23 @@ use nu_test_support::{nu, pipeline};
|
||||
fn all() {
|
||||
Playground::setup("sum_test_1", |dirs, sandbox| {
|
||||
sandbox.with_files(vec![FileWithContentToBeTrimmed(
|
||||
"meals.csv",
|
||||
"meals.json",
|
||||
r#"
|
||||
description,calories
|
||||
"1 large egg",90
|
||||
"1 cup white rice",250
|
||||
"1 tablespoon fish oil",108
|
||||
{
|
||||
meals: [
|
||||
{description: "1 large egg", calories: 90},
|
||||
{description: "1 cup white rice", calories: 250},
|
||||
{description: "1 tablespoon fish oil", calories: 108}
|
||||
]
|
||||
}
|
||||
"#,
|
||||
)]);
|
||||
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(), pipeline(
|
||||
r#"
|
||||
open meals.csv
|
||||
open meals.json
|
||||
| get meals
|
||||
| get calories
|
||||
| sum
|
||||
| echo $it
|
||||
|
@ -78,7 +78,7 @@ fn infers_types() {
|
||||
sandbox.with_files(vec![FileWithContentToBeTrimmed(
|
||||
"los_cuatro_mosqueteros.csv",
|
||||
r#"
|
||||
first_name,last_name,rusty_luck
|
||||
first_name,last_name,rusty_luck,d
|
||||
Andrés,Robalino,1,d
|
||||
Jonathan,Turner,1,d
|
||||
Yehuda,Katz,1,d
|
||||
|
Reference in New Issue
Block a user