Skip to content

zig test result hides printed output if it's missing a trailing newline #6856

@Sizik

Description

@Sizik

print.zig:

const print = @import("std").debug.print;

test "print" {
    print("This prints,", .{});
    print("\nand this prints,\n", .{});
    print("but this doesn't!", .{});
}

Running zig test print.zig on Windows 7 gives the following command prompt output:

C:\>zig test print.zig
Test [1/1] test "print"... This prints,
and this prints,
All 1 tests passed.

I'd expect the last line to be either one of the following:

but this doesn't!All 1 tests passed.
but this doesn't!
All 1 tests passed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions