zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit aa50bca1516f6fc2c9d6c7ca66ef8585b4b5e197 (tree)
parent 56303d770e8330eb47c12a395ce45e3d448f892d
Author: Jakub Konka <kubkon@jakubkonka.com>
Date:   Sat, 13 Jan 2024 12:49:54 +0100

test/link/elf: make invalid input file test less janky

Diffstat:
Mtest/link/elf.zig | 17+++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/test/link/elf.zig b/test/link/elf.zig @@ -3609,12 +3609,17 @@ fn testUnknownFileTypeError(b: *Build, opts: Options) *Step { exe.linkLibrary(dylib); exe.linkLibC(); - expectLinkErrors(exe, test_step, .{ .exact = &.{ - "invalid token in LD script: '\\x00\\x00\\x00\\x0c\\x00\\x00\\x00/usr/lib/dyld\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x0d' (0:829)", - "note: while parsing /?/liba.dylib", - "unexpected error: parsing input file failed with error InvalidLdScript", - "note: while parsing /?/liba.dylib", - } }); + // TODO: improve the test harness to be able to selectively match lines in error output + // while avoiding jankiness + // expectLinkErrors(exe, test_step, .{ .exact = &.{ + // "error: invalid token in LD script: '\\x00\\x00\\x00\\x0c\\x00\\x00\\x00/usr/lib/dyld\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x0d' (0:989)", + // "note: while parsing /?/liba.dylib", + // "error: unexpected error: parsing input file failed with error InvalidLdScript", + // "note: while parsing /?/liba.dylib", + // } }); + expectLinkErrors(exe, test_step, .{ + .contains = "error: unexpected error: parsing input file failed with error InvalidLdScript", + }); return test_step; }