use crate::PathBoundary;
#[test]
fn virtualpath_display_is_rooted_and_forward_slashed() {
let temp = tempfile::tempdir().unwrap();
let restriction = PathBoundary::<()>::try_new(temp.path()).unwrap();
let jp = restriction.strict_join("foo/bar.txt").unwrap();
let vp = jp.virtualize();
assert_eq!(vp.virtualpath_display().to_string(), "/foo/bar.txt");
assert_eq!(vp.virtualpath_display().to_string(), "/foo/bar.txt");
let root_vp: crate::path::virtual_path::VirtualPath<()> =
crate::path::virtual_path::VirtualPath::with_root(restriction.interop_path()).unwrap();
assert_eq!(root_vp.virtualpath_display().to_string(), "/");
}