Changeset 10964 for branches/2.0x/libtransmission/utils-test.c
- Timestamp:
- Jul 7, 2010, 4:48:24 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0x/libtransmission/utils-test.c
r10239 r10964 153 153 const char * in; 154 154 char * out; 155 tr_bool err;156 155 157 156 in = "hello world"; 158 out = tr_utf8clean( in, -1, &err ); 159 check( err == FALSE ) 157 out = tr_utf8clean( in, -1 ); 160 158 check( out != NULL ) 161 159 check( !strcmp( out, in ) ) … … 163 161 164 162 in = "hello world"; 165 out = tr_utf8clean( in, 5, &err ); 166 check( err == FALSE ) 163 out = tr_utf8clean( in, 5 ); 167 164 check( out != NULL ) 168 165 check( !strcmp( out, "hello" ) ) … … 171 168 /* this version is not utf-8 */ 172 169 in = "Òðóäíî áûòü Áîãîì"; 173 out = tr_utf8clean( in, 17 , &err);170 out = tr_utf8clean( in, 17 ); 174 171 check( out != NULL ) 175 check( err != 0 )176 172 check( strlen( out ) == 17 ) 177 173 check( tr_utf8_validate( out, -1, NULL ) ) … … 180 176 /* same string, but utf-8 clean */ 181 177 in = "ÃðóÀÃî áûòÌ Ãîãîì"; 182 out = tr_utf8clean( in, -1 , &err);178 out = tr_utf8clean( in, -1 ); 183 179 check( out != NULL ) 184 check( !err );185 180 check( tr_utf8_validate( out, -1, NULL ) ) 186 181 check ( !strcmp( in, out ) )
Note: See TracChangeset
for help on using the changeset viewer.