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

Function test_add_run_all_no_untracked

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

Source from the content-addressed store, hash-verified

1016 #[test]
1017 #[serial]
1018 fn test_add_run_all_no_untracked() {
1019 let _guard = DirGuard::new();
1020
1021 let temp_dir = tempfile::tempdir().unwrap();
1022 let repo_path = temp_dir.path();
1023
1024 // Initialize repository (no untracked files)
1025 {
1026 let _repo = Repository::init(repo_path).unwrap();
1027 }
1028
1029 std::env::set_current_dir(repo_path).unwrap();
1030
1031 let add = Add::new().with_all(true);
1032 let result = add.run();
1033
1034 // Should succeed with a message about nothing to add
1035 assert!(
1036 result.is_ok(),
1037 "Add --all with no files failed: {:?}",
1038 result.err()
1039 );
1040 }
1041
1042 #[test]
1043 #[serial]

Callers

nothing calls this directly

Calls 4

unwrapMethod · 0.45
pathMethod · 0.45
with_allMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected