wip: code to remove duplicate arguments

Also handle case where an argument is a substring of another argument
This commit is contained in:
andy.boot
2018-05-03 00:02:23 +01:00
parent 4792e97177
commit dd75ec4aa7
4 changed files with 97 additions and 17 deletions
+9 -1
View File
@@ -28,6 +28,15 @@ pub fn test_main_long_paths() {
.unwrap();
}
#[test]
pub fn test_main_multi_arg() {
assert_cli::Assert::main_binary()
.with_args(&["src/test_dir/many/", "src/test_dir/", "src/test_dir"])
.stdout()
.is(main_output(true))
.unwrap();
}
#[cfg(target_os = "macos")]
fn main_output(short_paths: bool) -> String {
format!(
@@ -271,4 +280,3 @@ fn recursive_sym_link_output(dir: &str, link_name: &str) -> String {
)
}
// TODO: add test for bad path