Skip to content
Myr

Merge pull request #2037 from parneetsingh022/tests/search-str-for-entry-edge-cases

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

Add tests for search_str_for_entry without base dir

authored by Thayne McCombs · committed by GitHub · parents 61c5399, 86c1e7d · Browse files · 1 file+16 added−0 removed
This commit

State

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

Diff stats

1 file+16 added−0 removed

  • other:+16 added−0 removed

1 file+16 added−0 removed

modified:src/walk.rs+16 added
733 unmodified lines
734 search_str_for_entry(Path::new("./foo/bar"), None),735 PathBuf::from("bar")736 );737 }738739 #[test]740 fn search_str_no_base_dir_with_plain_relative_path() {741 assert_eq!(742 search_str_for_entry(Path::new("foo/bar"), None),743 PathBuf::from("bar")744 );745 }746747 #[test]748 fn search_str_no_base_dir_with_file_in_current_dir() {749 assert_eq!(750 search_str_for_entry(Path::new("foo"), None),751 PathBuf::from("foo")752 );753 }754}