authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-01-13 12:49:54+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-01-24 12:34:39+01:00
logaa50bca1516f6fc2c9d6c7ca66ef8585b4b5e197
treeac1a0bd03f45f8b90f471a8e396c47beee399430
parent56303d770e8330eb47c12a395ce45e3d448f892d

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


1 files changed, 11 insertions(+), 6 deletions(-)

test/link/elf.zig+11-6
......@@ -3609,12 +3609,17 @@ fn testUnknownFileTypeError(b: *Build, opts: Options) *Step {
36093609 exe.linkLibrary(dylib);
36103610 exe.linkLibC();
36113611
3612 expectLinkErrors(exe, test_step, .{ .exact = &.{
3613 "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)",
3614 "note: while parsing /?/liba.dylib",
3615 "unexpected error: parsing input file failed with error InvalidLdScript",
3616 "note: while parsing /?/liba.dylib",
3617 } });
3612 // TODO: improve the test harness to be able to selectively match lines in error output
3613 // while avoiding jankiness
3614 // expectLinkErrors(exe, test_step, .{ .exact = &.{
3615 // "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)",
3616 // "note: while parsing /?/liba.dylib",
3617 // "error: unexpected error: parsing input file failed with error InvalidLdScript",
3618 // "note: while parsing /?/liba.dylib",
3619 // } });
3620 expectLinkErrors(exe, test_step, .{
3621 .contains = "error: unexpected error: parsing input file failed with error InvalidLdScript",
3622 });
36183623
36193624 return test_step;
36203625}