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:978–999  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

976 #[test]
977 #[file_serial]
978 fn test_add_run_multiple_files() {
979 let _guard = DirGuard::new();
980
981 let temp_dir = tempfile::tempdir().unwrap();
982 let repo_path = temp_dir.path();
983
984 // Initialize repository
985 {
986 let _repo = Repository::init(repo_path).unwrap();
987 }
988
989 // Create files to add
990 std::fs::write(repo_path.join("file1.txt"), "Content 1").unwrap();
991 std::fs::write(repo_path.join("file2.txt"), "Content 2").unwrap();
992
993 std::env::set_current_dir(repo_path).unwrap();
994
995 let add = Add::new().with_files(vec!["file1.txt", "file2.txt"]);
996 let result = add.run();
997
998 assert!(result.is_ok(), "Add failed: {:?}", result.err());
999 }
1000
1001 #[test]
1002 #[file_serial]

Callers

nothing calls this directly

Calls 6

initFunction · 0.50
writeFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45
with_filesMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected