Show More
@@ -206,6 +206,7 b' mod tests {' | |||||
206 |
|
206 | |||
207 | let base_dir = tempdir().unwrap(); |
|
207 | let base_dir = tempdir().unwrap(); | |
208 | let base_dir_path = base_dir.path(); |
|
208 | let base_dir_path = base_dir.path(); | |
|
209 | let skip = base_dir_path.components().count() - 1; | |||
209 | let a = base_dir_path.join("a"); |
|
210 | let a = base_dir_path.join("a"); | |
210 | let b = base_dir_path.join("b"); |
|
211 | let b = base_dir_path.join("b"); | |
211 | create_dir(&a).unwrap(); |
|
212 | create_dir(&a).unwrap(); | |
@@ -215,7 +216,7 b' mod tests {' | |||||
215 | // TODO make portable |
|
216 | // TODO make portable | |
216 | std::os::unix::fs::symlink(&a, &b).unwrap(); |
|
217 | std::os::unix::fs::symlink(&a, &b).unwrap(); | |
217 |
|
218 | |||
218 |
let buf = b.join("in_a").components().skip( |
|
219 | let buf = b.join("in_a").components().skip(skip).collect::<PathBuf>(); | |
219 | eprintln!("buf: {}", buf.display()); |
|
220 | eprintln!("buf: {}", buf.display()); | |
220 | let path = path_to_hg_path_buf(buf).unwrap(); |
|
221 | let path = path_to_hg_path_buf(buf).unwrap(); | |
221 | assert_eq!( |
|
222 | assert_eq!( |
General Comments 0
You need to be logged in to leave comments.
Login now