Merge pull request #2037 from parneetsingh022/tests/search-str-for-entry-edge-cases
Add tests for search_str_for_entry without base dir
This commit is contained in:
1 file changed
+16
+16
@@ -735,4 +735,20 @@ mod tests {
|
||||
PathBuf::from("bar")
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn search_str_no_base_dir_with_plain_relative_path() {
|
||||
assert_eq!(
|
||||
search_str_for_entry(Path::new("foo/bar"), None),
|
||||
PathBuf::from("bar")
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn search_str_no_base_dir_with_file_in_current_dir() {
|
||||
assert_eq!(
|
||||
search_str_for_entry(Path::new("foo"), None),
|
||||
PathBuf::from("foo")
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user