MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_add_run_file_not_found

Function test_add_run_file_not_found

atomic-cli/src/commands/add.rs:784–802  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

782 #[test]
783 #[serial]
784 fn test_add_run_file_not_found() {
785 let _guard = DirGuard::new();
786
787 let temp_dir = tempfile::tempdir().unwrap();
788 let repo_path = temp_dir.path();
789
790 // Initialize repository and drop to release lock
791 {
792 let _repo = Repository::init(repo_path).unwrap();
793 }
794
795 std::env::set_current_dir(repo_path).unwrap();
796
797 let add = Add::new().with_files(vec!["nonexistent.txt"]);
798 let result = add.run();
799
800 // Should fail because file doesn't exist
801 assert!(result.is_err());
802 }
803
804 #[test]
805 #[serial]

Callers

nothing calls this directly

Calls 4

unwrapMethod · 0.45
pathMethod · 0.45
with_filesMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected