Commit fbc90c18 authored by Josh Ayers's avatar Josh Ayers

Added tests for some stdio functions.

parent 7f97d71e
...@@ -20,7 +20,7 @@ cdef extern from "stdio.h" nogil: ...@@ -20,7 +20,7 @@ cdef extern from "stdio.h" nogil:
int fclose (FILE *stream) int fclose (FILE *stream)
int remove (const char *filename) int remove (const char *filename)
int rename (const char *oldname, const char *newname) int rename (const char *oldname, const char *newname)
FILE *tmpfile (void) FILE *tmpfile ()
int remove (const char *pathname) int remove (const char *pathname)
int rename (const char *oldpath, const char *newpath) int rename (const char *oldpath, const char *newpath)
...@@ -66,7 +66,7 @@ cdef extern from "stdio.h" nogil: ...@@ -66,7 +66,7 @@ cdef extern from "stdio.h" nogil:
char *gets (char *s) char *gets (char *s)
char *fgets (char *s, int count, FILE *stream) char *fgets (char *s, int count, FILE *stream)
int getchar (void) int getchar ()
int fgetc (FILE *stream) int fgetc (FILE *stream)
int getc (FILE *stream) int getc (FILE *stream)
int ungetc (int c, FILE *stream) int ungetc (int c, FILE *stream)
......
...@@ -36,6 +36,3 @@ from libc.stdio cimport * ...@@ -36,6 +36,3 @@ from libc.stdio cimport *
from libc.stdlib cimport * from libc.stdlib cimport *
from libc.string cimport * from libc.string cimport *
libc.stdio.printf("hello %s\n", b"world")
stdio.printf("hello %s\n", b"world")
printf("hello %s\n", b"world")
# mode: compile
cimport libc
from libc cimport stdio
from libc.stdio cimport printf, puts, fputs, putchar, fputc, putc, stdout
libc.stdio.printf("hello %s\n", b"world")
stdio.printf("hello %s\n", b"world")
printf("hello %s\n", b"world")
printf("printf_output %d %d\n", 1, 2)
puts("puts_output")
fputs("fputs_output", stdout)
putchar(b'z')
fputc(b'x', stdout)
putc(b'c', stdout)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment