We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25c12b8 commit 7732fe6Copy full SHA for 7732fe6
utils/src/path.rs
@@ -87,7 +87,12 @@ mod tests {
87
(r#"/path/"withquotes'"#, r#""/path/\"withquotes'""#),
88
];
89
for (v, quoted) in cases {
90
- assert_eq!(quoted, format!("{}", PathQuotedDisplay::new(&v)));
+ let q = PathQuotedDisplay::new(&v).to_string();
91
+ assert_eq!(quoted, q.as_str());
92
+ // Also sanity check there's exactly one token
93
+ let token = shlex::split(&q).unwrap();
94
+ assert_eq!(1, token.len());
95
+ assert_eq!(v, token[0]);
96
}
97
98
0 commit comments