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

     1  #include "tests.h"
     2  #include <stdio.h>
     3  
     4  int main()
     5  {
     6      plan(1);
     7      // check function `gets` only
     8      char str[50];
     9      int i;
    10      for (i = 0; i < 50; i++)
    11          str[i] = '\0';
    12      gets(str);
    13      is_streq(str, "7");
    14  
    15      done_testing();
    16  }