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

Function test_add_run_all_untracked

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

Source from the content-addressed store, hash-verified

1141 #[test]
1142 #[file_serial]
1143 fn test_add_run_all_untracked() {
1144 let _guard = DirGuard::new();
1145
1146 let temp_dir = tempfile::tempdir().unwrap();
1147 let repo_path = temp_dir.path();
1148
1149 // Initialize repository
1150 {
1151 let _repo = Repository::init(repo_path).unwrap();
1152 }
1153
1154 // Create untracked files
1155 std::fs::write(repo_path.join("file1.txt"), "Content 1").unwrap();
1156 std::fs::write(repo_path.join("file2.txt"), "Content 2").unwrap();
1157
1158 std::env::set_current_dir(repo_path).unwrap();
1159
1160 let add = Add::new().with_all(true);
1161 let result = add.run();
1162
1163 assert!(result.is_ok(), "Add --all failed: {:?}", result.err());
1164 }
1165
1166 #[test]
1167 #[file_serial]

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected