()
| 275 | } |
| 276 | |
| 277 | pub(crate) fn assert_ui() -> snapbox::Assert { |
| 278 | let root = paths::root(); |
| 279 | // Use `from_file_path` instead of `from_dir_path` so the trailing slash is |
| 280 | // put in the users output, rather than hidden in the variable |
| 281 | let root_url = url::Url::from_file_path(&root).unwrap().to_string(); |
| 282 | let root = root.display().to_string(); |
| 283 | |
| 284 | let mut subs = snapbox::Substitutions::new(); |
| 285 | subs.extend([ |
| 286 | ( |
| 287 | "[EXE]", |
| 288 | std::borrow::Cow::Borrowed(std::env::consts::EXE_SUFFIX), |
| 289 | ), |
| 290 | ("[ROOT]", std::borrow::Cow::Owned(root)), |
| 291 | ("[ROOTURL]", std::borrow::Cow::Owned(root_url)), |
| 292 | ]) |
| 293 | .unwrap(); |
| 294 | snapbox::Assert::new() |
| 295 | .action_env(snapbox::DEFAULT_ACTION_ENV) |
| 296 | .substitutions(subs) |
| 297 | } |
no test coverage detected