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

Source from the content-addressed store, hash-verified

1899 #[test]
1900 #[file_serial]
1901 fn test_status_run_no_untracked() {
1902 let _guard = DirGuard::new();
1903
1904 let temp_dir = tempfile::tempdir().unwrap();
1905 let repo_path = temp_dir.path();
1906
1907 // Initialize a repository and drop handle to release lock
1908 {
1909 let repo_result = Repository::init(repo_path);
1910 assert!(
1911 repo_result.is_ok(),
1912 "Failed to init repository: {:?}",
1913 repo_result.err()
1914 );
1915 }
1916
1917 // Create an untracked file
1918 std::fs::write(repo_path.join("untracked.txt"), "content").unwrap();
1919
1920 // Change to repo directory
1921 std::env::set_current_dir(repo_path).unwrap();
1922
1923 let status = Status::new().with_no_untracked(true);
1924 let result = status.run();
1925
1926 assert!(
1927 result.is_ok(),
1928 "Status no-untracked command failed: {:?}",
1929 result.err()
1930 );
1931 }
1932
1933 #[test]
1934 #[file_serial]

Callers

nothing calls this directly

Calls 6

with_no_untrackedMethod · 0.80
initFunction · 0.50
writeFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected