• Home
  • Raw
  • Download

Lines Matching full:some

25 /// assert_eq!(diff_paths(bar, baz), Some("../".into()));
26 /// assert_eq!(diff_paths(baz, bar), Some("baz".into()));
27 /// assert_eq!(diff_paths(quux, baz), Some("../quux".into()));
28 /// assert_eq!(diff_paths(baz, quux), Some("../baz".into()));
29 /// assert_eq!(diff_paths(bar, quux), Some("../".into()));
31 /// assert_eq!(diff_paths(&baz, &bar.to_string()), Some("baz".into()));
32 /// assert_eq!(diff_paths(Path::new(baz), Path::new(bar).to_path_buf()), Some("baz".into()));
44 Some(PathBuf::from(path)) in diff_paths()
55 (Some(a), None) => { in diff_paths()
61 (Some(a), Some(b)) if comps.is_empty() && a == b => (), in diff_paths()
62 (Some(a), Some(b)) if b == Component::CurDir => comps.push(a), in diff_paths()
63 (Some(_), Some(b)) if b == Component::ParentDir => return None, in diff_paths()
64 (Some(a), Some(_)) => { in diff_paths()
75 Some(comps.iter().map(|c| c.as_os_str()).collect()) in diff_paths()
93 /// assert_eq!(diff_utf8_paths(bar, baz), Some("../".into()));
94 /// assert_eq!(diff_utf8_paths(baz, bar), Some("baz".into()));
95 /// assert_eq!(diff_utf8_paths(quux, baz), Some("../quux".into()));
96 /// assert_eq!(diff_utf8_paths(baz, quux), Some("../baz".into()));
97 /// assert_eq!(diff_utf8_paths(bar, quux), Some("../".into()));
99 /// assert_eq!(diff_utf8_paths(&baz, &bar.to_string()), Some("baz".into()));
100 …/// assert_eq!(diff_utf8_paths(Utf8Path::new(baz), Utf8Path::new(bar).to_path_buf()), Some("baz".i…
113 Some(Utf8PathBuf::from(path)) in diff_utf8_paths()
124 (Some(a), None) => { in diff_utf8_paths()
130 (Some(a), Some(b)) if comps.is_empty() && a == b => (), in diff_utf8_paths()
131 (Some(a), Some(b)) if b == Utf8Component::CurDir => comps.push(a), in diff_utf8_paths()
132 (Some(_), Some(b)) if b == Utf8Component::ParentDir => return None, in diff_utf8_paths()
133 (Some(a), Some(_)) => { in diff_utf8_paths()
144 Some(comps.iter().map(|c| c.as_str()).collect()) in diff_utf8_paths()
158 assert_diff_paths("/foo", "/bar", Some("../foo")); in test_absolute()
159 assert_diff_paths("/foo", "bar", Some("/foo")); in test_absolute()
161 assert_diff_paths("foo", "bar", Some("../foo")); in test_absolute()
166 assert_diff_paths(".", ".", Some("")); in test_identity()
167 assert_diff_paths("../foo", "../foo", Some("")); in test_identity()
168 assert_diff_paths("./foo", "./foo", Some("")); in test_identity()
169 assert_diff_paths("/foo", "/foo", Some("")); in test_identity()
170 assert_diff_paths("foo", "foo", Some("")); in test_identity()
172 assert_diff_paths("../foo/bar/baz", "../foo/bar/baz", Some("".into())); in test_identity()
173 assert_diff_paths("foo/bar/baz", "foo/bar/baz", Some("")); in test_identity()
178 assert_diff_paths("foo", "fo", Some("../foo")); in test_subset()
179 assert_diff_paths("fo", "foo", Some("../fo")); in test_subset()
184 assert_diff_paths("", "", Some("")); in test_empty()
185 assert_diff_paths("foo", "", Some("foo")); in test_empty()
186 assert_diff_paths("", "foo", Some("..")); in test_empty()
191 assert_diff_paths("../foo", "../bar", Some("../foo")); in test_relative()
192 assert_diff_paths("../foo", "../foo/bar/baz", Some("../..")); in test_relative()
193 assert_diff_paths("../foo/bar/baz", "../foo", Some("bar/baz")); in test_relative()
195 assert_diff_paths("foo/bar/baz", "foo", Some("bar/baz")); in test_relative()
196 assert_diff_paths("foo/bar/baz", "foo/bar", Some("baz")); in test_relative()
197 assert_diff_paths("foo/bar/baz", "foo/bar/baz", Some("")); in test_relative()
198 assert_diff_paths("foo/bar/baz", "foo/bar/baz/", Some("")); in test_relative()
200 assert_diff_paths("foo/bar/baz/", "foo", Some("bar/baz")); in test_relative()
201 assert_diff_paths("foo/bar/baz/", "foo/bar", Some("baz")); in test_relative()
202 assert_diff_paths("foo/bar/baz/", "foo/bar/baz", Some("")); in test_relative()
203 assert_diff_paths("foo/bar/baz/", "foo/bar/baz/", Some("")); in test_relative()
205 assert_diff_paths("foo/bar/baz", "foo/", Some("bar/baz")); in test_relative()
206 assert_diff_paths("foo/bar/baz", "foo/bar/", Some("baz")); in test_relative()
207 assert_diff_paths("foo/bar/baz", "foo/bar/baz", Some("")); in test_relative()
212 assert_diff_paths(".", "foo", Some("../.")); in test_current_directory()
213 assert_diff_paths("foo", ".", Some("foo")); in test_current_directory()
214 assert_diff_paths("/foo", "/.", Some("foo")); in test_current_directory()