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

Function test_add_run_multiple_files

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

Source from the content-addressed store, hash-verified

828 #[test]
829 #[serial]
830 fn test_add_run_multiple_files() {
831 let _guard = DirGuard::new();
832
833 let temp_dir = tempfile::tempdir().unwrap();
834 let repo_path = temp_dir.path();
835
836 // Initialize repository
837 {
838 let _repo = Repository::init(repo_path).unwrap();
839 }
840
841 // Create files to add
842 std::fs::write(repo_path.join("file1.txt"), "Content 1").unwrap();
843 std::fs::write(repo_path.join("file2.txt"), "Content 2").unwrap();
844
845 std::env::set_current_dir(repo_path).unwrap();
846
847 let add = Add::new().with_files(vec!["file1.txt", "file2.txt"]);
848 let result = add.run();
849
850 assert!(result.is_ok(), "Add failed: {:?}", result.err());
851 }
852
853 #[test]
854 #[serial]

Callers

nothing calls this directly

Calls 5

writeFunction · 0.85
unwrapMethod · 0.45
pathMethod · 0.45
with_filesMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected