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 de80ef3 commit 457809bCopy full SHA for 457809b
helix-core/src/shellwords.rs
@@ -212,4 +212,19 @@ mod test {
212
];
213
assert_eq!(expected, result);
214
}
215
+
216
+ #[test]
217
+ #[cfg(unix)]
218
+ fn test_escaping_unix() {
219
+ assert_eq!(escape("foobar"), Cow::Borrowed("foobar"));
220
+ assert_eq!(escape("foo bar"), Cow::Borrowed("foo\\ bar"));
221
+ assert_eq!(escape("foo\tbar"), Cow::Borrowed("foo\\\tbar"));
222
+ }
223
224
225
+ #[cfg(windows)]
226
+ fn test_escaping_windows() {
227
228
+ assert_eq!(escape("foo bar"), Cow::Borrowed("\"foo\\ bar\""));
229
230
0 commit comments