mirror of
https://github.com/nushell/nushell.git
synced 2025-08-16 02:38:37 +02:00
Pick->Select rename. Integration tests changes. (#1725)
Pick->Select rename. Integration tests changes.
This commit is contained in:
committed by
GitHub
parent
c3efdf2689
commit
96e5fc05a3
@ -14,5 +14,5 @@ fn table_to_bson_and_back_into_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "whel");
|
||||
assert_eq!(actual.out, "whel");
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ fn table_to_csv_text_and_from_csv_text_back_into_table() {
|
||||
"open caco3_plastics.csv | to csv | from csv | first 1 | get origin | echo $it"
|
||||
);
|
||||
|
||||
assert_eq!(actual, "SPAIN");
|
||||
assert_eq!(actual.out, "SPAIN");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -39,7 +39,9 @@ fn table_to_csv_text() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.contains("Tigre Ecuador,OMYA Andina,3824909999,Calcium carbonate,Colombia"));
|
||||
assert!(actual
|
||||
.out
|
||||
.contains("Tigre Ecuador,OMYA Andina,3824909999,Calcium carbonate,Colombia"));
|
||||
})
|
||||
}
|
||||
|
||||
@ -68,7 +70,9 @@ fn table_to_csv_text_skipping_headers_after_conversion() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.contains("Tigre Ecuador,OMYA Andina,3824909999,Calcium carbonate,Colombia"));
|
||||
assert!(actual
|
||||
.out
|
||||
.contains("Tigre Ecuador,OMYA Andina,3824909999,Calcium carbonate,Colombia"));
|
||||
})
|
||||
}
|
||||
|
||||
@ -96,7 +100,7 @@ fn infers_types() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "4");
|
||||
assert_eq!(actual.out, "4");
|
||||
})
|
||||
}
|
||||
|
||||
@ -124,7 +128,7 @@ fn from_csv_text_to_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "3");
|
||||
assert_eq!(actual.out, "3");
|
||||
})
|
||||
}
|
||||
|
||||
@ -152,7 +156,7 @@ fn from_csv_text_with_separator_to_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "3");
|
||||
assert_eq!(actual.out, "3");
|
||||
})
|
||||
}
|
||||
|
||||
@ -180,7 +184,7 @@ fn from_csv_text_with_tab_separator_to_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "3");
|
||||
assert_eq!(actual.out, "3");
|
||||
})
|
||||
}
|
||||
|
||||
@ -207,6 +211,6 @@ fn from_csv_text_skipping_headers_to_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "3");
|
||||
assert_eq!(actual.out, "3");
|
||||
})
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ fn from_eml_get_to_field() {
|
||||
)
|
||||
);
|
||||
|
||||
assert_eq!(actual, "username@domain.com");
|
||||
assert_eq!(actual.out, "username@domain.com");
|
||||
|
||||
let actual = nu!(
|
||||
cwd: TEST_CWD,
|
||||
@ -31,7 +31,7 @@ fn from_eml_get_to_field() {
|
||||
)
|
||||
);
|
||||
|
||||
assert_eq!(actual, "");
|
||||
assert_eq!(actual.out, "");
|
||||
}
|
||||
|
||||
// The Reply-To field in this email is "aw-confirm@ebay.com" <aw-confirm@ebay.com>, meaning both the Name and Address values are identical.
|
||||
@ -49,7 +49,7 @@ fn from_eml_get_replyto_field() {
|
||||
)
|
||||
);
|
||||
|
||||
assert_eq!(actual, "aw-confirm@ebay.com");
|
||||
assert_eq!(actual.out, "aw-confirm@ebay.com");
|
||||
|
||||
let actual = nu!(
|
||||
cwd: TEST_CWD,
|
||||
@ -63,7 +63,7 @@ fn from_eml_get_replyto_field() {
|
||||
)
|
||||
);
|
||||
|
||||
assert_eq!(actual, "aw-confirm@ebay.com");
|
||||
assert_eq!(actual.out, "aw-confirm@ebay.com");
|
||||
}
|
||||
|
||||
// The Reply-To field in this email is "aw-confirm@ebay.com" <aw-confirm@ebay.com>, meaning both the Name and Address values are identical.
|
||||
@ -80,5 +80,5 @@ fn from_eml_get_subject_field() {
|
||||
)
|
||||
);
|
||||
|
||||
assert_eq!(actual, "Billing Issues");
|
||||
assert_eq!(actual.out, "Billing Issues");
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ fn out_html_simple() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "<html><body>3</body></html>");
|
||||
assert_eq!(actual.out, "<html><body>3</body></html>");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -22,7 +22,7 @@ fn out_html_table() {
|
||||
));
|
||||
|
||||
assert_eq!(
|
||||
actual,
|
||||
actual.out,
|
||||
"<html><body><table><tr><th>name</th></tr><tr><td>jason</td></tr></table></body></html>"
|
||||
);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ fn infers_types() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "2");
|
||||
assert_eq!(actual.out, "2");
|
||||
})
|
||||
}
|
||||
|
||||
@ -96,6 +96,6 @@ fn from_ics_text_to_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "Maryland Game");
|
||||
assert_eq!(actual.out, "Maryland Game");
|
||||
})
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ fn table_to_json_text_and_from_json_text_back_into_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "markup");
|
||||
assert_eq!(actual.out, "markup");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -40,7 +40,7 @@ fn from_json_text_to_table() {
|
||||
"open katz.txt | from json | get katz | get rusty_luck | count | echo $it"
|
||||
);
|
||||
|
||||
assert_eq!(actual, "4");
|
||||
assert_eq!(actual.out, "4");
|
||||
})
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ fn from_json_text_recognizing_objects_independently_to_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "3");
|
||||
assert_eq!(actual.out, "3");
|
||||
})
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ fn table_to_json_text() {
|
||||
open sample.txt
|
||||
| lines
|
||||
| split-column "," name luck
|
||||
| pick name
|
||||
| select name
|
||||
| to json
|
||||
| from json
|
||||
| nth 0
|
||||
@ -98,6 +98,6 @@ fn table_to_json_text() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "JonAndrehudaTZ");
|
||||
assert_eq!(actual.out, "JonAndrehudaTZ");
|
||||
})
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ fn out_md_simple() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "3");
|
||||
assert_eq!(actual.out, "3");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -21,5 +21,5 @@ fn out_md_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "|name||-||jason|");
|
||||
assert_eq!(actual.out, "|name||-||jason|");
|
||||
}
|
||||
|
@ -13,5 +13,5 @@ fn from_ods_file_to_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "Gill");
|
||||
assert_eq!(actual.out, "Gill");
|
||||
}
|
||||
|
@ -15,5 +15,5 @@ fn table_to_sqlite_and_back_into_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "hello");
|
||||
assert_eq!(actual.out, "hello");
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ fn from_ssv_text_to_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "172.30.78.158");
|
||||
assert_eq!(actual.out, "172.30.78.158");
|
||||
})
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ fn from_ssv_text_to_table_with_separator_specified() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "172.30.78.158");
|
||||
assert_eq!(actual.out, "172.30.78.158");
|
||||
})
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ fn from_ssv_text_treating_first_line_as_data_with_flag() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(aligned_columns, separator_based);
|
||||
assert_eq!(separator_based, "docker-registry");
|
||||
assert_eq!(aligned_columns.out, separator_based.out);
|
||||
assert_eq!(separator_based.out, "docker-registry");
|
||||
})
|
||||
}
|
||||
|
@ -13,5 +13,5 @@ fn table_to_toml_text_and_from_toml_text_back_into_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "nu");
|
||||
assert_eq!(actual.out, "nu");
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ fn table_to_tsv_text_and_from_tsv_text_back_into_table() {
|
||||
"open caco3_plastics.tsv | to tsv | from tsv | first 1 | get origin | echo $it"
|
||||
);
|
||||
|
||||
assert_eq!(actual, "SPAIN");
|
||||
assert_eq!(actual.out, "SPAIN");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -19,7 +19,7 @@ fn table_to_tsv_text_and_from_tsv_text_back_into_table_using_csv_separator() {
|
||||
r"open caco3_plastics.tsv | to tsv | from csv --separator '\t' | first 1 | get origin | echo $it"
|
||||
);
|
||||
|
||||
assert_eq!(actual, "SPAIN");
|
||||
assert_eq!(actual.out, "SPAIN");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -48,7 +48,7 @@ fn table_to_tsv_text() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.contains("Colombia"));
|
||||
assert!(actual.out.contains("Colombia"));
|
||||
})
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ fn table_to_tsv_text_skipping_headers_after_conversion() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.contains("Colombia"));
|
||||
assert!(actual.out.contains("Colombia"));
|
||||
})
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ fn from_tsv_text_to_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "3");
|
||||
assert_eq!(actual.out, "3");
|
||||
})
|
||||
}
|
||||
|
||||
@ -131,6 +131,6 @@ fn from_tsv_text_skipping_headers_to_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "3");
|
||||
assert_eq!(actual.out, "3");
|
||||
})
|
||||
}
|
||||
|
@ -13,5 +13,5 @@ fn can_encode_and_decode_urlencoding() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "comté");
|
||||
assert_eq!(actual.out, "comté");
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ fn infers_types() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "2");
|
||||
assert_eq!(actual.out, "2");
|
||||
})
|
||||
}
|
||||
|
||||
@ -79,6 +79,6 @@ fn from_vcf_text_to_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "john.doe99@gmail.com");
|
||||
assert_eq!(actual.out, "john.doe99@gmail.com");
|
||||
})
|
||||
}
|
||||
|
@ -13,5 +13,5 @@ fn from_excel_file_to_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "Gill");
|
||||
assert_eq!(actual.out, "Gill");
|
||||
}
|
||||
|
@ -13,5 +13,5 @@ fn table_to_yaml_text_and_from_yaml_text_back_into_table() {
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "nushell");
|
||||
assert_eq!(actual.out, "nushell");
|
||||
}
|
||||
|
Reference in New Issue
Block a user