()
| 384 | |
| 385 | #[test] |
| 386 | fn should_support_a_local_relative_path() { |
| 387 | let remote: String = GitConfig::new("src".into(), None, None) |
| 388 | .unwrap() |
| 389 | .remote |
| 390 | .into(); |
| 391 | #[cfg(unix)] |
| 392 | assert!( |
| 393 | remote.ends_with("/src"), |
| 394 | "remote {} ends with /src", |
| 395 | &remote |
| 396 | ); |
| 397 | #[cfg(windows)] |
| 398 | assert!( |
| 399 | remote.ends_with("\\src"), |
| 400 | "remote {} ends with \\src", |
| 401 | &remote |
| 402 | ); |
| 403 | |
| 404 | #[cfg(unix)] |
| 405 | assert!(remote.starts_with('/'), "remote {} starts with /", &remote); |
| 406 | #[cfg(windows)] |
| 407 | assert!( |
| 408 | remote.starts_with("\\\\?\\"), |
| 409 | "remote {} starts with \\\\?\\", |
| 410 | &remote |
| 411 | ); |
| 412 | } |
| 413 | |
| 414 | #[test] |
| 415 | fn should_support_a_local_absolute_path() { |
nothing calls this directly
no outgoing calls
no test coverage detected