check50 icon indicating copy to clipboard operation
check50 copied to clipboard

`check50` ANSI and HTML output do not make clear when `stdout` has unprintable characters

Open dmalan opened this issue 3 years ago • 1 comments

As in a bug like

#include <stdio.h>

int foo(char c)
{
    printf('%c', c + 1);
    return 0;
}

int main(void)
{
    char c = 'a';
    printf('%c', foo(c));
}

which ends up printing b followed by an invisible NUL (because mainprintsfoo's return value) followed by \n, which wouldn't match an expectation of b\n, but whose NUL student could not see in check50`'s output.

dmalan avatar Sep 14 '22 23:09 dmalan

- which ends up printing `b` followed by an invisible NUL (because main`prints`foo`'s return value) followed by `\n`, which wouldn't match an expectation of `b\n`, but whose NUL student could not see in `check50`'s output.
+ which ends up printing `b` followed by an invisible NUL (because ``main`prints`foo``'s return value) followed by `\n`, which wouldn't match an expectation of `b\n`, but whose NUL student could not see in `check50`'s output.

Original in description:

which ends up printing b followed by an invisible NUL (because mainprintsfoo's return value) followed by \n, which wouldn't match an expectation of b\n, but whose NUL student could not see in check50`'s output.

I think what was intended:

which ends up printing b followed by an invisible NUL (because main`prints`foo's return value) followed by \n, which wouldn't match an expectation of b\n, but whose NUL student could not see in check50's output.

goyalyashpal avatar Dec 04 '23 12:12 goyalyashpal