---
source: src/patch/parse.rs
expression: patches
input_file: src/patch/test-data/0003-win-add-libdir-build.zig.patch
---
Ok(
    [
        Patch {
            original: Some(
                Filename(
                    "build.zig.old",
                ),
            ),
            modified: Some(
                Filename(
                    "build.zig",
                ),
            ),
            hunks: [
                Hunk {
                    old_range: HunkRange {
                        start: 762,
                        len: 1,
                    },
                    new_range: HunkRange {
                        start: 762,
                        len: 5,
                    },
                    function_context: None,
                    lines: [
                        Delete(
                            "    mod.addLibraryPath(.{ .cwd_relative = cfg.llvm_lib_dir });\n",
                        ),
                        Insert(
                            "    // Split system_lib_dir by semicolon and add each path\n",
                        ),
                        Insert(
                            "    var it = std.mem.splitScalar(u8, cfg.llvm_lib_dir, ';');\n",
                        ),
                        Insert(
                            "    while (it.next()) |path| {\n",
                        ),
                        Insert(
                            "        mod.addLibraryPath(.{ .cwd_relative = path });\n",
                        ),
                        Insert(
                            "    }\n",
                        ),
                    ],
                },
            ],
        },
    ],
)
