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:330–339  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

328
329 #[test]
330 fn test_resolve_destination_to_directory() {
331 let cmd = Move::new("file.txt", "subdir");
332 let temp = tempfile::tempdir().unwrap();
333
334 // Create the target directory
335 std::fs::create_dir(temp.path().join("subdir")).unwrap();
336
337 let result = cmd.resolve_destination(temp.path(), "file.txt", "subdir");
338 assert_eq!(result, "subdir/file.txt");
339 }
340
341 #[test]
342 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