diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2020-10-11 00:41:05 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2020-10-13 08:38:17 +0200 |
| commit | cf2aea7b41c42e171cc4a5516d77ed6f5df040c6 (patch) | |
| tree | 94acb0441110611d18d059456be2aa9c067f32e1 /test | |
| parent | ecd480fe93b7ee1882267bed6efbfcfe45402ab6 (diff) | |
| download | zig-cf2aea7b41c42e171cc4a5516d77ed6f5df040c6.tar.gz zig-cf2aea7b41c42e171cc4a5516d77ed6f5df040c6.zip | |
Enable incremental testcase for macOS
Diffstat (limited to 'test')
| -rw-r--r-- | test/stage2/test.zig | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/stage2/test.zig b/test/stage2/test.zig index 5f5fe76d17..3599478aa9 100644 --- a/test/stage2/test.zig +++ b/test/stage2/test.zig @@ -186,6 +186,38 @@ pub fn addCases(ctx: *TestContext) !void { , "Hello, World!\n", ); + // Now change the message only + case.addCompareOutput( + \\export fn _start() noreturn { + \\ print(); + \\ + \\ exit(); + \\} + \\ + \\fn print() void { + \\ asm volatile ("syscall" + \\ : + \\ : [number] "{rax}" (0x2000004), + \\ [arg1] "{rdi}" (1), + \\ [arg2] "{rsi}" (@ptrToInt("What is up? This is a longer message that will force the data to be relocated in virtual address space.\n")), + \\ [arg3] "{rdx}" (104) + \\ : "memory" + \\ ); + \\ return; + \\} + \\ + \\fn exit() noreturn { + \\ asm volatile ("syscall" + \\ : + \\ : [number] "{rax}" (0x2000001), + \\ [arg1] "{rdi}" (0) + \\ : "memory" + \\ ); + \\ unreachable; + \\} + , + "What is up? This is a longer message that will force the data to be relocated in virtual address space.\n", + ); } { |
