test add and rm
[?]
Jun 3, 2025, 7:09 PM
QYDWH7KBIBYZA22PFVZJMZZ3BN65XEYEMVCC6WMVGCZE3A4GQBXACDependencies
Change contents
- edit in libflorescence/src/repo/test.rs at line 129
);}#[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 filelet 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 { .. } - edit in libflorescence/src/repo/test.rs at line 153
repo::rm(&mut internal.repo, new_file);let adiff = repo::diff(&internal.repo);assert!(adiff.changes.is_empty());