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

Function test_resolve_path_relative

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.45
pathMethod · 0.45
resolve_pathMethod · 0.45

Tested by

no test coverage detected