Commit Graph

29 Commits

Author SHA1 Message Date
jD91mZM2 8fca7bcbc1 More printf tests and corner cases 2019-04-23 08:15:58 +02:00
jD91mZM2 0a0aec502b Fix #140 2019-04-23 07:34:06 +02:00
jD91mZM2 3f98962054 Fix bug in scanf where EOF would be ignored 2019-03-28 17:57:13 +01:00
Tibor Nagy a92be000fb tests: Even more work on error handling
realpath: Fixing undefined behaviour in the second test. If the call fails the resolved_name argument cannot be used for error checking because its state is undefined by SUSv2.
pipe: Changing the order of close and write error handling code. Errors in close could overwrite errno after write errors, returning incorrect error messages.
gmtime: Removed duplicate checks
Other fixes for fseek, rename, mktime, putwchar
2019-02-24 22:02:11 +01:00
Tibor Nagy 2d027f0771 tests: More work on error handling 2019-02-24 00:46:26 +01:00
Tibor Nagy 513f4ba53c tests: Documentation for test_helpers.h, more refactoring 2019-02-22 13:19:38 +01:00
Tibor Nagy 9a0ea6ff34 tests: More refactoring, add helper header to every test, override exit for better error reporting 2019-02-21 21:13:28 +01:00
Tibor Nagy d1a424c002 tests: Replace returns with exits in the main functions
This will allow us to redefine the exit function.

For example:
```
#define exit(code) { \
    fprintf(stderr, "%s:%d: exit(%s) in function ‘%s’\n",
        __FILE__, __LINE__, #code, __func__); \
    _exit(code); \
}
```
2019-02-21 12:15:06 +01:00
Tibor Nagy 4381bb2a22 tests: Remove redundant return statements
When the execution reaches the end of the main functions, they implicitly return a successful status.
2019-02-20 21:09:03 +01:00
Tibor Nagy c19cc8b731 tests: Portability fixes, replaced 0/1/-1 return codes with macros 2019-02-20 20:20:07 +01:00
Tibor Nagy ff874c87d7 tests: Fix function signatures 2019-02-20 19:27:18 +01:00
lmiskiew 5b6b11cb65 Fix panic in fwrite 2018-12-17 02:01:36 +01:00
Jeremy Soller 950b4526c7 - Disable output of empty header files
- Remove incorrect header styles
- Use export.replace where header style was previously needed
- Check compilation of tests using system gcc
2018-11-26 21:35:02 -07:00
Jeremy Soller 52493a1ec3 Add popen/pclose 2018-11-25 10:33:50 -07:00
jD91mZM2 75c5c04bee Implement a proper mutex type for future usage 2018-10-15 15:24:14 +02:00
jD91mZM2 23fe526c55 Fix feof and ferror 2018-10-14 15:57:42 +02:00
jD91mZM2 63882684b2 Implement almost all of printf 2018-10-13 14:20:54 +02:00
jD91mZM2 dd711f4dee Fix bug in fread
Bug discovered by @xTibor. Test and input data provided by him.
2018-09-29 15:04:58 +02:00
jD91mZM2 243ce18ecd Implement ftell 2018-09-26 17:48:46 +02:00
jD91mZM2 afc1ff134a Rewrite IO to use core-io library 2018-09-26 16:13:09 +02:00
Tom Almeida b43299642b Fix buffering issue with large output through stdio 2018-09-21 15:21:39 +02:00
Tom Almeida d5a9cd6953 Add tests to make sure setvbuf works. 2018-08-09 02:08:53 +08:00
Tom Almeida d219d57acb Fix an issue where _IONBF would cause an overflow error 2018-08-09 00:49:57 +08:00
jD91mZM2 40a7380a58 Fix snprintf and make strftime use a counting writer 2018-08-07 21:31:05 +02:00
jD91mZM2 b20307dca0 Implement fnmatch.h 2018-08-05 19:50:49 +02:00
jD91mZM2 b5adee798d Move scanf unit tests to normal C tests 2018-08-05 09:53:07 +02:00
jD91mZM2 67d5976622 Clean up tests 2018-07-22 11:24:50 +02:00
Tom Almeida 8d40424020 Added freopen() and relevant tests 2018-03-16 20:24:40 +08:00
Tom Almeida b0492eba84 Added some tests for stdio 2018-03-15 15:28:14 +08:00