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 a297b58 commit 271abb6Copy full SHA for 271abb6
helix-core/src/shellwords.rs
@@ -243,4 +243,18 @@ mod test {
243
];
244
assert_eq!(expected, result);
245
}
246
+
247
+ #[cfg(unix)]
248
+ fn test_escaping_unix() {
249
+ assert_eq!(escape("foobar"), Cow::Borrowed("foobar"));
250
+ assert_eq!(escape("foo bar"), Cow::Borrowed("foo\\ bar"));
251
+ assert_eq!(escape("foo\tbar"), Cow::Borrowed("foo\\\tbar"));
252
+ }
253
254
+ #[test]
255
+ #[cfg(windows)]
256
+ fn test_escaping_windows() {
257
258
+ assert_eq!(escape("foo bar"), Cow::Borrowed("\"foo bar\""));
259
260
0 commit comments