mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
Fix raw strings as external argument (#12817)
# Description As discovered by @YizhePKU in a [comment](https://github.com/nushell/nushell/pull/9956#issuecomment-2103123797) in #9956, raw strings are not parsed properly when they are used as an argument to an external command. This PR fixes that. # Tests + Formatting Added a test.
This commit is contained in:
@ -314,6 +314,7 @@ mod external_words {
|
||||
use super::nu;
|
||||
use nu_test_support::fs::Stub::FileWithContent;
|
||||
use nu_test_support::{pipeline, playground::Playground};
|
||||
|
||||
#[test]
|
||||
fn relaxed_external_words() {
|
||||
let actual = nu!("
|
||||
@ -323,6 +324,12 @@ mod external_words {
|
||||
assert_eq!(actual.out, "joturner@foo.bar.baz");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn raw_string_as_external_argument() {
|
||||
let actual = nu!("nu --testbin cococo r#'asdf'#");
|
||||
assert_eq!(actual.out, "asdf");
|
||||
}
|
||||
|
||||
//FIXME: jt: limitation in testing - can't use single ticks currently
|
||||
#[ignore]
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user