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