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

Function test_resolve_path_relative

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

Source from the content-addressed store, hash-verified

1027 #[test]
1028 #[serial]
1029 fn test_resolve_path_relative() {
1030 let temp = TempDir::new().unwrap();
1031 let original_dir = std::env::current_dir().unwrap();
1032 std::env::set_current_dir(temp.path()).unwrap();
1033
1034 let init = Init::at_path("subdir");
1035 let resolved = init.resolve_path();
1036
1037 std::env::set_current_dir(original_dir).unwrap();
1038
1039 assert!(resolved.is_ok());
1040 assert!(resolved.unwrap().ends_with("subdir"));
1041 }
1042
1043 #[test]
1044 #[serial]

Callers

nothing calls this directly

Calls 3

unwrapMethod · 0.45
pathMethod · 0.45
resolve_pathMethod · 0.45

Tested by

no test coverage detected