mirror of
https://github.com/nushell/nushell.git
synced 2024-12-22 15:13:01 +01:00
swept clean quotes
This commit is contained in:
parent
b502954558
commit
162c8b4274
@ -18,7 +18,7 @@ fn ls_lists_regular_files() {
|
||||
nu!(
|
||||
output,
|
||||
cwd(&full_path),
|
||||
r#"ls | get name | lines | split-column "." | get Column2 | str Column2 --to-int | sum | echo $it"#
|
||||
r#"ls | get name | lines | split-column "." | get Column2 | str --to-int | sum | echo $it"#
|
||||
);
|
||||
|
||||
assert_eq!(output, "30");
|
||||
@ -40,7 +40,7 @@ fn ls_lists_regular_files_using_asterisk_wildcard() {
|
||||
nu!(
|
||||
output,
|
||||
cwd(&full_path),
|
||||
"ls *.txt | get name | lines| split-column \".\" | get Column2 | str Column2 --to-int | sum | echo $it"
|
||||
r#"ls *.txt | get name | lines| split-column "." | get Column2 | str --to-int | sum | echo $it"#
|
||||
);
|
||||
|
||||
assert_eq!(output, "3");
|
||||
@ -62,7 +62,7 @@ fn ls_lists_regular_files_using_question_mark_wildcard() {
|
||||
nu!(
|
||||
output,
|
||||
cwd(&full_path),
|
||||
"ls *.??.txt | get name | lines| split-column \".\" | get Column2 | str Column2 --to-int | sum | echo $it"
|
||||
r#"ls *.??.txt | get name | lines| split-column "." | get Column2 | str --to-int | sum | echo $it"#
|
||||
);
|
||||
|
||||
assert_eq!(output, "30");
|
||||
|
@ -17,7 +17,7 @@ fn recognizes_csv() {
|
||||
nu!(
|
||||
output,
|
||||
cwd("tests/fixtures/nuplayground/open_recognizes_csv_test"),
|
||||
"open nu.zion.csv | where author == \"Andres N. Robalino\" | get source | echo $it"
|
||||
r#"open nu.zion.csv | where author == "Andres N. Robalino" | get source | echo $it"#
|
||||
);
|
||||
|
||||
assert_eq!(output, "Ecuador");
|
||||
|
@ -51,7 +51,7 @@ fn rm_removes_files_with_wildcard() {
|
||||
nu!(
|
||||
_output,
|
||||
cwd("tests/fixtures/nuplayground/rm_wildcard_test_1"),
|
||||
"rm \"src/*/*/*.rs\""
|
||||
r#"rm "src/*/*/*.rs""#
|
||||
);
|
||||
|
||||
assert!(!h::files_exist_at(
|
||||
|
@ -7,7 +7,7 @@ use helpers as h;
|
||||
fn lines() {
|
||||
nu!(output,
|
||||
cwd("tests/fixtures/formats"),
|
||||
"open cargo_sample.toml --raw | lines | skip-while $it != \"[dependencies]\" | skip 1 | first 1 | split-column \"=\" | get Column1 | trim | echo $it"
|
||||
r#"open cargo_sample.toml --raw | lines | skip-while $it != "[dependencies]" | skip 1 | first 1 | split-column "=" | get Column1 | trim | echo $it"#
|
||||
);
|
||||
|
||||
assert_eq!(output, "rustyline");
|
||||
|
@ -4,8 +4,6 @@ use helpers::in_directory as cwd;
|
||||
|
||||
#[test]
|
||||
fn external_command() {
|
||||
// Echo should exist on all currently supported platforms. A better approach might
|
||||
// be to generate a dummy executable as part of the tests with known semantics.
|
||||
nu!(output, cwd("tests/fixtures"), "echo 1");
|
||||
|
||||
assert!(output.contains("1"));
|
||||
|
@ -119,7 +119,7 @@ fn find_and_replaces() {
|
||||
nu!(
|
||||
output,
|
||||
cwd("tests/fixtures/nuplayground/plugin_str_find_and_replaces_test"),
|
||||
"open sample.toml | str fortune.teller.phone --find-replace KATZ \"5289\" | get fortune.teller.phone | echo $it"
|
||||
r#"open sample.toml | str fortune.teller.phone --find-replace KATZ "5289" | get fortune.teller.phone | echo $it"#
|
||||
);
|
||||
|
||||
assert_eq!(output, "1-800-5289");
|
||||
@ -140,7 +140,7 @@ fn find_and_replaces_without_passing_field() {
|
||||
nu!(
|
||||
output,
|
||||
cwd("tests/fixtures/nuplayground/plugin_str_find_and_replaces_without_passing_field_test"),
|
||||
"open sample.toml | get fortune.teller.phone | str --find-replace KATZ \"5289\" | echo $it"
|
||||
r#"open sample.toml | get fortune.teller.phone | str --find-replace KATZ "5289" | echo $it"#
|
||||
);
|
||||
|
||||
assert_eq!(output, "1-800-5289");
|
||||
|
@ -27,7 +27,7 @@ fn converts_structured_table_to_csv_text() {
|
||||
nu!(
|
||||
output,
|
||||
cwd("tests/fixtures/nuplayground/filter_to_csv_test_1"),
|
||||
r#"open sample.txt | lines | split-column ",s" a b c d origin | last 1 | to-csv | lines | nth 1 | echo "$it""#
|
||||
r#"open sample.txt | lines | split-column "," a b c d origin | last 1 | to-csv | lines | nth 1 | echo "$it""#
|
||||
);
|
||||
|
||||
assert!(output.contains("Tigre Ecuador,OMYA Andina,3824909999,Calcium carbonate,Colombia"));
|
||||
|
@ -27,7 +27,7 @@ fn external_has_correct_quotes() {
|
||||
fn add_plugin() {
|
||||
nu!(output,
|
||||
cwd("tests/fixtures/formats"),
|
||||
"open cargo_sample.toml | add dev-dependencies.newdep \"1\" | get dev-dependencies.newdep | echo $it"
|
||||
r#"open cargo_sample.toml | add dev-dependencies.newdep "1" | get dev-dependencies.newdep | echo $it"#
|
||||
);
|
||||
|
||||
assert_eq!(output, "1");
|
||||
@ -37,7 +37,7 @@ fn add_plugin() {
|
||||
fn edit_plugin() {
|
||||
nu!(output,
|
||||
cwd("tests/fixtures/formats"),
|
||||
"open cargo_sample.toml | edit dev-dependencies.pretty_assertions \"7\" | get dev-dependencies.pretty_assertions | echo $it"
|
||||
r#"open cargo_sample.toml | edit dev-dependencies.pretty_assertions "7" | get dev-dependencies.pretty_assertions | echo $it"#
|
||||
);
|
||||
|
||||
assert_eq!(output, "7");
|
||||
|
Loading…
Reference in New Issue
Block a user