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