| 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 | |