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

Function test_constructor_invalid_path_with_source

atomic-cli/src/error.rs:1161–1171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected