diff options
author | Andrew Gallant <jamslam@gmail.com> | 2017-01-10 18:16:15 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2017-01-10 18:16:15 -0500 |
commit | 8751e5570697e6b2b913b2ab06e0dabf9f28b436 (patch) | |
tree | 51a57c6e292aaa8dc74ec30635faf2ad9c509726 /tests | |
parent | 2143bcf9cb259c2230aa79a7cbc23cb1ec1fdae7 (diff) |
Add --path-separator flag.
This flag permits setting the path separator used for all file paths
printed by ripgrep in normal operation.
Fixes #275
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tests.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs index 11a76044..92d8e8ca 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -1226,6 +1226,16 @@ clean!(feature_263_sort_files, "test", ".", |wd: WorkDir, mut cmd: Command| { assert_eq!(lines, "abc:test\nbar:test\nfoo:test\nzoo:test\n"); }); +// See: https://github.com/BurntSushi/ripgrep/issues/275 +clean!(feature_275_pathsep, "test", ".", |wd: WorkDir, mut cmd: Command| { + wd.create_dir("foo"); + wd.create("foo/bar", "test"); + cmd.arg("--path-separator").arg("Z"); + + let lines: String = wd.stdout(&mut cmd); + assert_eq!(lines, "fooZbar:test\n"); +}); + #[test] fn binary_nosearch() { let wd = WorkDir::new("binary_nosearch"); |