()
| 1159 | |
| 1160 | #[test] |
| 1161 | fn test_constructor_invalid_path_with_source() { |
| 1162 | let io_err = std::io::Error::new(std::io::ErrorKind::NotFound, "not found"); |
| 1163 | let err = CliError::invalid_path("/nonexistent", Some(io_err)); |
| 1164 | match err { |
| 1165 | CliError::InvalidPath { path, source } => { |
| 1166 | assert_eq!(path, PathBuf::from("/nonexistent")); |
| 1167 | assert!(source.is_some()); |
| 1168 | } |
| 1169 | _ => panic!("Wrong error variant"), |
| 1170 | } |
| 1171 | } |
| 1172 | |
| 1173 | #[test] |
| 1174 | fn test_constructor_invalid_path_without_source() { |
nothing calls this directly
no outgoing calls
no test coverage detected