github.com/Konstantin8105/c4go@v0.0.0-20240505174241-768bb1c65a51/tests/getchar.c (about)

     1  // getchar() needs to be in it's own file because it takes input from stdin.
     2  
     3  #include "tests.h"
     4  #include <stdio.h>
     5  
     6  int main()
     7  {
     8      plan(1);
     9  
    10      int c;
    11      c = getchar();
    12      is_eq(c, '7');
    13  
    14      done_testing();
    15  }