MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_location_set_leaf_name

Function test_location_set_leaf_name

std/src/storage/mod.rs:801–817  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

799
800 #[test]
801 fn test_location_set_leaf_name() {
802 let mut location = Location::new("drv:/").unwrap();
803 location.set_leaf_name("foo");
804 assert_eq!("DRV:/foo", format!("{}", location));
805
806 let mut location = Location::new("drv:").unwrap();
807 location.set_leaf_name("foo");
808 assert_eq!("DRV:/foo", format!("{}", location));
809
810 let mut location = Location::new("/bar").unwrap();
811 location.set_leaf_name("foo");
812 assert_eq!("/foo", format!("{}", location));
813
814 let mut location = Location::new("bar").unwrap();
815 location.set_leaf_name("foo");
816 assert_eq!("foo", format!("{}", location));
817 }
818
819 #[test]
820 fn test_location_set_extension() {

Callers

nothing calls this directly

Calls 1

set_leaf_nameMethod · 0.80

Tested by

no test coverage detected