forked from extern/nushell
Escape some symbols in external args (#1687)
* Escape some symbols in external args * Don't escape on Windows, which does its own * fix warning
This commit is contained in:
@ -48,6 +48,20 @@ fn automatically_change_directory_with_trailing_slash_and_same_name_as_command()
|
||||
})
|
||||
}
|
||||
|
||||
// #[test]
|
||||
// fn correctly_escape_external_arguments() {
|
||||
// let actual = nu!(cwd: ".", r#"^echo '[{"foo": "bar"}]' | from-json | to-json"#);
|
||||
|
||||
// assert_eq!(actual, "{\"foo\":\"bar\"}");
|
||||
// }
|
||||
|
||||
#[test]
|
||||
fn correctly_escape_external_arguments() {
|
||||
let actual = nu!(cwd: ".", r#"^echo '$0'"#);
|
||||
|
||||
assert_eq!(actual, "$0");
|
||||
}
|
||||
|
||||
mod it_evaluation {
|
||||
use super::nu;
|
||||
use nu_test_support::fs::Stub::{EmptyFile, FileWithContent, FileWithContentToBeTrimmed};
|
||||
|
Reference in New Issue
Block a user