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

Function test_log_run_in_subdirectory

atomic-cli/src/commands/log/tests.rs:874–898  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

872 #[test]
873 #[file_serial]
874 fn test_log_run_in_subdirectory() {
875 let _guard = TestGuard::new();
876
877 // Initialize repository
878 let repo_result = Repository::init(".");
879 if repo_result.is_err() {
880 // Filesystem may be read-only or other issues in test environment
881 return;
882 }
883 drop(repo_result.unwrap());
884
885 // Create and move to subdirectory
886 if fs::create_dir("subdir").is_err() {
887 // Filesystem may be read-only
888 return;
889 }
890 if env::set_current_dir("subdir").is_err() {
891 return;
892 }
893
894 let log = Log::new();
895 let result = log.run();
896
897 assert!(result.is_ok(), "{result:?}");
898 }
899
900 // Edge Case Tests
901

Callers

nothing calls this directly

Calls 3

initFunction · 0.50
unwrapMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected