Changes in uspace/lib/posix/test/scanf.c [7f9df7b9:0d0b319] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/test/scanf.c
r7f9df7b9 r0d0b319 27 27 */ 28 28 29 29 #define LIBPOSIX_INTERNAL 30 #define __POSIX_DEF__(x) posix_##x 30 31 31 32 #include <errno.h> … … 51 52 PCUT_TEST(int_decimal) { 52 53 int number; 53 int rc = sscanf("4242", "%d", &number);54 int rc = posix_sscanf("4242", "%d", &number); 54 55 PCUT_ASSERT_INT_EQUALS(1, rc); 55 56 PCUT_ASSERT_INT_EQUALS(4242, number); … … 58 59 PCUT_TEST(int_negative_decimal) { 59 60 int number; 60 int rc = sscanf("-53", "%d", &number);61 int rc = posix_sscanf("-53", "%d", &number); 61 62 PCUT_ASSERT_INT_EQUALS(1, rc); 62 63 PCUT_ASSERT_INT_EQUALS(-53, number); … … 82 83 void *p; 83 84 84 int rc = sscanf(85 int rc = posix_sscanf( 85 86 "\n j tt % \t -121314 98765 aqw 0765 0x77 0xABCDEF88 -99 884", 86 87 " j tt %%%3hhd%1hhu%3hd %3hu%u aqw%n %lo%llx %p %li %lld", … … 107 108 long double ld; 108 109 109 int rc = sscanf(110 int rc = posix_sscanf( 110 111 "\n \t\t1.0 -0x555.AP10 1234.5678e12", 111 112 "%f %lf %Lf", … … 123 124 char *pstr; 124 125 125 int rc = sscanf(126 int rc = posix_sscanf( 126 127 "\n\n\thello world \n", 127 128 "%5s %ms", … … 140 141 char *pscanset; 141 142 142 int rc = sscanf(143 int rc = posix_sscanf( 143 144 "\n\n\th-e-l-l-o world-] \n", 144 145 " %9[-eh-o] %m[^]-]", … … 157 158 char *pseq; 158 159 159 int rc = sscanf(160 int rc = posix_sscanf( 160 161 "\n\n\thello world \n", 161 162 " %5c %mc",
Note:
See TracChangeset
for help on using the changeset viewer.