test untracked files

[?]
Jun 3, 2025, 7:20 PM
B6YUTY3QLUMPXDFM7LHRSPGBQSGH6VNFSQHQXJNGKD5MQKW6P6KAC

Dependencies

Change contents

  • edit in libflorescence/src/repo/test.rs at line 139
    [3.608]
    [2.15]
    }
    #[test]
    fn test_untracked_files() {
    let repo = setup_test_repo();
    let repo_path = repo_path(&repo);
    let (internal, _state) = repo::load(repo_path.clone()).unwrap();
    let untracked_files = repo::untracked_files(&internal.repo);
    assert!(untracked_files.is_empty());
    // Write a new file
    let new_file = "new_file";
    std::fs::write(repo_path.join(new_file), "some content").unwrap();
    let untracked_files = repo::untracked_files(&internal.repo);
    assert_eq!(untracked_files.len(), 1);
    assert_eq!(untracked_files.first().unwrap(), new_file);