test diff
[?]
Jun 3, 2025, 7:06 PM
2LWMGRUM2OLIJHW7XW4HSISIHJAV3JFCWQYRWYV2P2VMSFHJ5CKQCDependencies
- [2]
VCNKFNUFapp init test - [3]
I56UGW7Umake record test, fix log update - [4]
YYKXNBFLtest: add untracked file - [5]
SWDPAGF6test channel name - [6]
FL2ULDJNtest record - [7]
OC6DLIZ3test record when nothing to record - [8]
KQ3P3QRLupdate comments - [9]
UF5NJKAStest load repo
Change contents
- edit in libflorescence/src/testing.rs at line 15
pub const DEFAULT_IGNORE_FILE: &str = ".ignore"; - replacement in libflorescence/src/testing.rs at line 79
let file_to_record = ".ignore";repo::add(&mut repo, file_to_record);repo::add(&mut repo, DEFAULT_IGNORE_FILE); - replacement in libflorescence/src/repo/test.rs at line 3
repo_path, setup_test_repo, setup_test_repo_in_subdir, INITIAL_LOG_LEN,repo_path, setup_test_repo, setup_test_repo_in_subdir, DEFAULT_IGNORE_FILE,INITIAL_LOG_LEN, - edit in libflorescence/src/repo/test.rs at line 98
// Make a change to a tracked filestd::fs::write(repo_path.join(DEFAULT_IGNORE_FILE), "some content").unwrap(); - edit in libflorescence/src/repo/test.rs at line 103
// Record it - edit in libflorescence/src/repo/test.rs at line 105
std::fs::write(repo_path.join(".ignore"), "some content").unwrap(); - edit in libflorescence/src/repo/test.rs at line 109
}#[test]fn test_diff() {let repo = setup_test_repo();let repo_path = repo_path(&repo);let (internal, _state) = repo::load(repo_path.clone()).unwrap();let adiff = repo::diff(&internal.repo);assert!(adiff.changes.is_empty());// Make a change to a tracked filestd::fs::write(repo_path.join(DEFAULT_IGNORE_FILE), "some content").unwrap();let adiff = repo::diff(&internal.repo);assert_eq!(adiff.changes.len(), 1);assert_matches!(adiff.changes.get(0).unwrap(),libpijul::change::BaseHunk::Replacement { .. }); - replacement in inflorescence/src/test.rs at line 11
INITIAL_LOG_LEN,DEFAULT_IGNORE_FILE, INITIAL_LOG_LEN, - replacement in inflorescence/src/test.rs at line 760
assert_eq!(log[0].file_paths, [".ignore"]);assert_eq!(log[0].file_paths, [DEFAULT_IGNORE_FILE]);