);
}
#[test]
fn test_add_and_rm() {
let repo = setup_test_repo();
let repo_path = repo_path(&repo);
let (mut internal, _state) = repo::load(repo_path.clone()).unwrap();
let adiff = repo::diff(&internal.repo);
assert!(adiff.changes.is_empty());
// Write a new file
let new_file = "new_file";
std::fs::write(repo_path.join(new_file), "some content").unwrap();
repo::add(&mut internal.repo, new_file);
let adiff = repo::diff(&internal.repo);
assert_eq!(adiff.changes.len(), 1);
assert_matches!(
adiff.changes.get(0).unwrap(),
libpijul::change::BaseHunk::FileAdd { .. }