lawrence-laz / neotest-zig

Test runner for Zig in Neovim using Neotest backend.
MIT License
27 stars 7 forks source link

Fix for zig master #6

Closed Ratakor closed 12 months ago

Ratakor commented 12 months ago

Zig compiler now checks if a local variable is mutated so that variable needs to be const. On a side note I don't understand why there is this check at the end

    if (passed_count != 1 or skip_count != 1 or fail_count != 1) {
        std.process.exit(1);
    }

I think ors should be replaced with ands otherwise the process will always exit with 1.

lawrence-laz commented 12 months ago

Good to know, thanks!

Regarding the check, I am dumbfound, cannot explain it either. 😅 Changed it to something similar to Zig's standard test runner:

    if (fail_count != 0) {
        std.process.exit(1);
    }