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

Function test_resolve_destination_to_directory

atomic-cli/src/commands/mv.rs:336–345  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

334
335 #[test]
336 fn test_resolve_destination_to_directory() {
337 let cmd = Move::new("file.txt", "subdir");
338 let temp = tempfile::tempdir().unwrap();
339
340 // Create the target directory
341 std::fs::create_dir(temp.path().join("subdir")).unwrap();
342
343 let result = cmd.resolve_destination(temp.path(), "file.txt", "subdir");
344 assert_eq!(result, "subdir/file.txt");
345 }
346
347 #[test]
348 fn test_resolve_destination_trailing_slash() {

Callers

nothing calls this directly

Calls 3

resolve_destinationMethod · 0.80
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected