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

Function test_resolve_path_relative

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

Source from the content-addressed store, hash-verified

1156 #[test]
1157 #[file_serial]
1158 fn test_resolve_path_relative() {
1159 let temp = TempDir::new().unwrap();
1160 let original_dir = std::env::current_dir().unwrap();
1161 std::env::set_current_dir(temp.path()).unwrap();
1162
1163 let init = Init::at_path("subdir");
1164 let resolved = init.resolve_path();
1165
1166 std::env::set_current_dir(original_dir).unwrap();
1167
1168 assert!(resolved.is_ok());
1169 assert!(resolved.unwrap().ends_with("subdir"));
1170 }
1171
1172 #[test]
1173 #[file_serial]

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.45
pathMethod · 0.45
resolve_pathMethod · 0.45

Tested by

no test coverage detected