Added some tests for stdio
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc, char ** argv) {
|
||||
FILE *f = fopen("stdio/stdio.in", "r");
|
||||
printf("%c\n", fgetc(f));
|
||||
ungetc('H', f);
|
||||
char *in = malloc(30);
|
||||
printf("%s\n", fgets(in, 30, f));
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
int main(int argc, char ** argv) {
|
||||
FILE *f = fopen("stdio/fwrite.out", "w");
|
||||
char *in = "Hello World!";
|
||||
fputs(in, f); // calls fwrite, helpers::fwritex, internal::to_write and internal::stdio_write
|
||||
fclose(f);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
Hello World!
|
||||
@@ -0,0 +1,3 @@
|
||||
Hello World!
|
||||
|
||||
Line 2
|
||||
Reference in New Issue
Block a user