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

Function test_status_run_no_untracked

atomic-cli/src/commands/status.rs:1087–1117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1085 #[test]
1086 #[serial]
1087 fn test_status_run_no_untracked() {
1088 let _guard = DirGuard::new();
1089
1090 let temp_dir = tempfile::tempdir().unwrap();
1091 let repo_path = temp_dir.path();
1092
1093 // Initialize a repository and drop handle to release lock
1094 {
1095 let repo_result = Repository::init(repo_path);
1096 assert!(
1097 repo_result.is_ok(),
1098 "Failed to init repository: {:?}",
1099 repo_result.err()
1100 );
1101 }
1102
1103 // Create an untracked file
1104 std::fs::write(repo_path.join("untracked.txt"), "content").unwrap();
1105
1106 // Change to repo directory
1107 std::env::set_current_dir(repo_path).unwrap();
1108
1109 let status = Status::new().with_no_untracked(true);
1110 let result = status.run();
1111
1112 assert!(
1113 result.is_ok(),
1114 "Status no-untracked command failed: {:?}",
1115 result.err()
1116 );
1117 }
1118
1119 #[test]
1120 #[serial]

Callers

nothing calls this directly

Calls 5

writeFunction · 0.85
with_no_untrackedMethod · 0.80
unwrapMethod · 0.45
pathMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected