Skip to content
Myr

Add more unit tests, search directories and symlinks too

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by sharkdp · committed by sharkdp · parent 10cd964 · Browse files · 2 files+96 added−57 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+96 added−57 removed

  • tests:+95 added−54 removed
  • other:+1 added−3 removed

2 files+96 added−57 removed

modified:src/main.rs+1 added-3 removed
114 unmodified lines
115 let search_str =116 if config.search_full_path {117 path_rel.to_str()118 } else {119 if !path_rel.is_file() { continue }120119 path_rel.file_name()120 .and_then(OsStr::to_str)121 };122
72 unmodified lines
195 "print this help message");196 opts.optflag("s", "sensitive",197 "case-sensitive search (default: smart case)");198 opts.optflag("p", "full-path",201 "search full path (default: filename only)");199 "search full path (default: file-/dirname only)");200 opts.optflag("H", "hidden",201 "search hidden files/directories");202 opts.optflag("I", "no-ignore",203 "do not respect .(git)ignore files");
62 unmodified lines
modified:tests/test.sh+95 added-54 removed