Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-vcs/src/git/test.rs')
| -rw-r--r-- | helix-vcs/src/git/test.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/helix-vcs/src/git/test.rs b/helix-vcs/src/git/test.rs index cb339732..95ff10b2 100644 --- a/helix-vcs/src/git/test.rs +++ b/helix-vcs/src/git/test.rs @@ -2,7 +2,7 @@ use std::{fs::File, io::Write, path::Path, process::Command}; use tempfile::TempDir; -use crate::git::Git; +use crate::git; fn exec_git_cmd(args: &str, git_dir: &Path) { let res = Command::new("git") @@ -54,7 +54,7 @@ fn missing_file() { let file = temp_git.path().join("file.txt"); File::create(&file).unwrap().write_all(b"foo").unwrap(); - assert!(Git.get_diff_base(&file).is_err()); + assert!(git::get_diff_base(&file).is_err()); } #[test] @@ -64,7 +64,7 @@ fn unmodified_file() { let contents = b"foo".as_slice(); File::create(&file).unwrap().write_all(contents).unwrap(); create_commit(temp_git.path(), true); - assert_eq!(Git.get_diff_base(&file).unwrap(), Vec::from(contents)); + assert_eq!(git::get_diff_base(&file).unwrap(), Vec::from(contents)); } #[test] @@ -76,7 +76,7 @@ fn modified_file() { create_commit(temp_git.path(), true); File::create(&file).unwrap().write_all(b"bar").unwrap(); - assert_eq!(Git.get_diff_base(&file).unwrap(), Vec::from(contents)); + assert_eq!(git::get_diff_base(&file).unwrap(), Vec::from(contents)); } /// Test that `get_file_head` does not return content for a directory. @@ -95,7 +95,7 @@ fn directory() { std::fs::remove_dir_all(&dir).unwrap(); File::create(&dir).unwrap().write_all(b"bar").unwrap(); - assert!(Git.get_diff_base(&dir).is_err()); + assert!(git::get_diff_base(&dir).is_err()); } /// Test that `get_file_head` does not return content for a symlink. @@ -116,6 +116,6 @@ fn symlink() { symlink("file.txt", &file_link).unwrap(); create_commit(temp_git.path(), true); - assert!(Git.get_diff_base(&file_link).is_err()); - assert_eq!(Git.get_diff_base(&file).unwrap(), Vec::from(contents)); + assert!(git::get_diff_base(&file_link).is_err()); + assert_eq!(git::get_diff_base(&file).unwrap(), Vec::from(contents)); } |