fn test_win_mapping()

in src/windows/pdb.rs [477:504]


    fn test_win_mapping() {
        let mapping = PathMappings::new(
            &Some(vec!["rev=abcdef"]),
            &Some(vec![r"d:\\agent\\_work\\3\\s\\src\\(.*)"]),
            &Some(vec!["https://source/{rev}/{1}"]),
            &None,
        )
        .unwrap();
        let dll = "basic32.dll";
        let output = get_new_bp(dll, mapping.map(Arc::new));
        let bp = BreakpadObject::parse(&output).unwrap();

        let map = bp.file_map();
        let files: Vec<_> = map.values().collect();

        assert_eq!(
            files[6].replace('\\', "/"),
            "https://source/abcdef/vctools/crt/vcstartup/src/eh/i386/secchk.c"
        );
        assert_eq!(
            files[7].replace('\\', "/"),
            "https://source/abcdef/vctools/crt/vcstartup/src/heap/delete_scalar_size.cpp"
        );
        assert_eq!(
            files[files.len() - 1].replace('\\', "/"),
            "https://source/abcdef/vctools/crt/vcruntime/src/string/i386/memcmp.c"
        );
    }