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

Function test_resolve_path_relative

atomic-cli/src/commands/init.rs:1042–1054  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1040 #[test]
1041 #[serial]
1042 fn test_resolve_path_relative() {
1043 let temp = TempDir::new().unwrap();
1044 let original_dir = std::env::current_dir().unwrap();
1045 std::env::set_current_dir(temp.path()).unwrap();
1046
1047 let init = Init::at_path("subdir");
1048 let resolved = init.resolve_path();
1049
1050 std::env::set_current_dir(original_dir).unwrap();
1051
1052 assert!(resolved.is_ok());
1053 assert!(resolved.unwrap().ends_with("subdir"));
1054 }
1055
1056 #[test]
1057 #[serial]

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.45
pathMethod · 0.45
resolve_pathMethod · 0.45

Tested by

no test coverage detected