Lines Matching refs:myFile

29 static void TestFileFromICU(UFILE *myFile) {  in TestFileFromICU()  argument
47 if (myFile == NULL) { in TestFileFromICU()
69 u_fprintf(myFile, "Signed decimal integer %%d: %d\n", *n); in TestFileFromICU()
70 u_fprintf(myFile, "Signed decimal integer %%i: %i\n", *n); in TestFileFromICU()
71 u_fprintf(myFile, "Unsigned octal integer %%o: %o\n", *n); in TestFileFromICU()
72 u_fprintf(myFile, "Unsigned decimal integer %%u: %u\n", *n); in TestFileFromICU()
73 u_fprintf(myFile, "Lowercase unsigned hexadecimal integer %%x: %x\n", *n); in TestFileFromICU()
74 u_fprintf(myFile, "Uppercase unsigned hexadecimal integer %%X: %X\n", *n); in TestFileFromICU()
75 u_fprintf(myFile, "Float %%f: %f\n", myFloat); in TestFileFromICU()
76 u_fprintf(myFile, "Lowercase float %%e: %e\n", myFloat); in TestFileFromICU()
77 u_fprintf(myFile, "Uppercase float %%E: %E\n", myFloat); in TestFileFromICU()
78 u_fprintf(myFile, "Lowercase float %%g: %g\n", myFloat); in TestFileFromICU()
79 u_fprintf(myFile, "Uppercase float %%G: %G\n", myFloat); in TestFileFromICU()
80 u_fprintf(myFile, "Pointer %%p: %p\n", origPtr); in TestFileFromICU()
81 u_fprintf(myFile, "Char %%c: %c\n", 'A'); in TestFileFromICU()
82 u_fprintf(myFile, "UChar %%C: %C\n", (UChar)0x0041); /*'A'*/ in TestFileFromICU()
83 u_fprintf(myFile, "String %%s: %s\n", "My-String"); in TestFileFromICU()
84 u_fprintf(myFile, "NULL String %%s: %s\n", NULL); in TestFileFromICU()
85 u_fprintf(myFile, "Unicode String %%S: %S\n", myStringOrig); in TestFileFromICU()
86 u_fprintf(myFile, "NULL Unicode String %%S: %S\n", NULL); in TestFileFromICU()
87 u_fprintf(myFile, "Percent %%P (non-ANSI): %P\n", myFloat); in TestFileFromICU()
88 u_fprintf(myFile, "Spell Out %%V (non-ANSI): %V\n", myFloat); in TestFileFromICU()
90 if (u_feof(myFile)) { in TestFileFromICU()
95 u_fprintf(myFile, "\t\nPointer to integer (Count) %%n: n=%d %n n=%d\n", *n, n, *n); in TestFileFromICU()
96 u_fprintf(myFile, "Pointer to integer Value: %d\n", *n); in TestFileFromICU()
97 …u_fprintf(myFile, "This is a long test123456789012345678901234567890123456789012345678901234567890… in TestFileFromICU()
99 u_fprintf(myFile, "\tNormal fprintf count: n=%d %n n=%d\n", (int)*n, (int*)n, (int)*n); in TestFileFromICU()
100 …fprintf(u_fgetfile(myFile), "\tNormal fprintf count value: n=%d\n", (int)*n); /* Should be 27 as s… in TestFileFromICU()
102 u_fclose(myFile); in TestFileFromICU()
103 myFile = u_fopen(STANDARD_TEST_FILE, "r", STANDARD_TEST_LOCALE, NULL); in TestFileFromICU()
105 if (myFile == NULL) { in TestFileFromICU()
110 if (u_feof(myFile)) { in TestFileFromICU()
114 myUString[0] = u_fgetc(myFile); in TestFileFromICU()
118 u_fungetc(myUString[0], myFile); in TestFileFromICU()
119 myUString[0] = u_fgetc(myFile); in TestFileFromICU()
123 u_fungetc(myUString[0], myFile); in TestFileFromICU()
124 myUString[0] = u_fgetc(myFile); in TestFileFromICU()
128 u_fungetc(myUString[0], myFile); in TestFileFromICU()
129 myUString[0] = u_fgetc(myFile); in TestFileFromICU()
130 myUString[1] = (UChar)u_fgetcx(myFile); /* Mix getc and getcx and see what happens. */ in TestFileFromICU()
131 myUString[2] = u_fgetc(myFile); in TestFileFromICU()
135 u_fungetc(myUString[2], myFile); in TestFileFromICU()
136 u_fungetc(myUString[1], myFile); in TestFileFromICU()
137 u_fungetc(myUString[0], myFile); in TestFileFromICU()
142 u_fscanf(myFile, "Signed decimal integer %%d: %d\n", newValuePtr); in TestFileFromICU()
147 u_fscanf(myFile, "Signed decimal integer %%i: %i\n", newValuePtr); in TestFileFromICU()
152 u_fscanf(myFile, "Unsigned octal integer %%o: %o\n", newValuePtr); in TestFileFromICU()
157 u_fscanf(myFile, "Unsigned decimal integer %%u: %u\n", newValuePtr); in TestFileFromICU()
162 u_fscanf(myFile, "Lowercase unsigned hexadecimal integer %%x: %x\n", newValuePtr); in TestFileFromICU()
167 u_fscanf(myFile, "Uppercase unsigned hexadecimal integer %%X: %X\n", newValuePtr); in TestFileFromICU()
172 u_fscanf(myFile, "Float %%f: %lf\n", newDoubleValuePtr); in TestFileFromICU()
177 u_fscanf(myFile, "Lowercase float %%e: %le\n", newDoubleValuePtr); in TestFileFromICU()
182 u_fscanf(myFile, "Uppercase float %%E: %lE\n", newDoubleValuePtr); in TestFileFromICU()
187 u_fscanf(myFile, "Lowercase float %%g: %lg\n", newDoubleValuePtr); in TestFileFromICU()
192 u_fscanf(myFile, "Uppercase float %%G: %lG\n", newDoubleValuePtr); in TestFileFromICU()
197 u_fscanf(myFile, "Pointer %%p: %p\n", &ptr); in TestFileFromICU()
201 u_fscanf(myFile, "Char %%c: %c\n", myString); in TestFileFromICU()
205 u_fscanf(myFile, "UChar %%C: %C\n", myUString); in TestFileFromICU()
209 u_fscanf(myFile, "String %%s: %s\n", myString); in TestFileFromICU()
213 u_fscanf(myFile, "NULL String %%s: %s\n", myString); in TestFileFromICU()
217 u_fscanf(myFile, "Unicode String %%S: %S\n", myUString); in TestFileFromICU()
222 u_fscanf(myFile, "NULL Unicode String %%S: %S\n", myUString); in TestFileFromICU()
228 u_fscanf(myFile, "Percent %%P (non-ANSI): %P\n", newDoubleValuePtr); in TestFileFromICU()
233 u_fscanf(myFile, "Spell Out %%V (non-ANSI): %V\n", newDoubleValuePtr); in TestFileFromICU()
238 u_fgets(myUString, 4, myFile); in TestFileFromICU()
246 if (u_fgets(myUString, sizeof(myUString)/sizeof(*myUString), myFile) != myUString) { in TestFileFromICU()
254 if (u_fgets(myUString, sizeof(myUString)/sizeof(*myUString), myFile) != myUString) { in TestFileFromICU()
262 if (u_fgets(myUString, sizeof(myUString)/sizeof(*myUString), myFile) != myUString) { in TestFileFromICU()
270 if (u_fgets(myUString, 0, myFile) != NULL) { in TestFileFromICU()
274 if (u_fgets(myUString, 1, myFile) != myUString) { in TestFileFromICU()
282 if (u_fgets(myUString, 2, myFile) != myUString) { in TestFileFromICU()
290 u_austrncpy(myString, u_fgets(myUString, sizeof(myUString)/sizeof(*myUString), myFile), in TestFileFromICU()
296 if (u_feof(myFile)) { in TestFileFromICU()
299 u_austrncpy(myString, u_fgets(myUString, sizeof(myUString)/sizeof(*myUString), myFile), in TestFileFromICU()
304 if (!u_feof(myFile)) { in TestFileFromICU()
307 if (u_fscanf(myFile, "%S\n", myUString) != 0) { in TestFileFromICU()
311 u_fclose(myFile); in TestFileFromICU()
363 UFILE *myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, NULL); in TestCodepageAndLocale() local
364 if (myFile == NULL) { in TestCodepageAndLocale()
368 if (u_fgetcodepage(myFile) == NULL in TestCodepageAndLocale()
369 || strcmp(u_fgetcodepage(myFile), ucnv_getDefaultName()) != 0) in TestCodepageAndLocale()
372 u_fgetcodepage(myFile), ucnv_getDefaultName()); in TestCodepageAndLocale()
375 if (u_fgetlocale(myFile) == NULL in TestCodepageAndLocale()
376 || strcmp(u_fgetlocale(myFile), uloc_getDefault()) != 0) in TestCodepageAndLocale()
379 u_fgetlocale(myFile), uloc_getDefault()); in TestCodepageAndLocale()
382 u_fclose(myFile); in TestCodepageAndLocale()
384 myFile = u_fopen(STANDARD_TEST_FILE, "w", "es", NULL); in TestCodepageAndLocale()
385 if (u_fgetcodepage(myFile) == NULL in TestCodepageAndLocale()
386 || strcmp(u_fgetcodepage(myFile), ucnv_getDefaultName()) != 0) in TestCodepageAndLocale()
389 u_fgetcodepage(myFile)); in TestCodepageAndLocale()
392 if (u_fgetlocale(myFile) == NULL in TestCodepageAndLocale()
393 || strcmp(u_fgetlocale(myFile), "es") != 0) in TestCodepageAndLocale()
396 u_fgetlocale(myFile), "es"); in TestCodepageAndLocale()
399 u_fclose(myFile); in TestCodepageAndLocale()
401 myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "UTF-16"); in TestCodepageAndLocale()
402 if (u_fgetcodepage(myFile) == NULL in TestCodepageAndLocale()
403 || strcmp(u_fgetcodepage(myFile), "UTF-16") != 0) in TestCodepageAndLocale()
406 u_fgetcodepage(myFile)); in TestCodepageAndLocale()
409 if (u_fgetlocale(myFile) == NULL in TestCodepageAndLocale()
410 || strcmp(u_fgetlocale(myFile), uloc_getDefault()) != 0) in TestCodepageAndLocale()
413 u_fgetlocale(myFile), uloc_getDefault()); in TestCodepageAndLocale()
416 u_fclose(myFile); in TestCodepageAndLocale()
418 myFile = u_fopen(STANDARD_TEST_FILE, "w", "zh", "UTF-16"); in TestCodepageAndLocale()
419 if (u_fgetcodepage(myFile) == NULL in TestCodepageAndLocale()
420 || strcmp(u_fgetcodepage(myFile), "UTF-16") != 0) in TestCodepageAndLocale()
423 u_fgetcodepage(myFile)); in TestCodepageAndLocale()
426 if (u_fgetlocale(myFile) == NULL in TestCodepageAndLocale()
427 || strcmp(u_fgetlocale(myFile), "zh") != 0) in TestCodepageAndLocale()
430 u_fgetlocale(myFile), "zh"); in TestCodepageAndLocale()
433 u_fclose(myFile); in TestCodepageAndLocale()
441 UFILE *myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "UTF-16"); in TestfgetsBuffers() local
446 if (myFile == NULL) { in TestfgetsBuffers()
451 u_fputc(0x3BC, myFile); in TestfgetsBuffers()
452 if (u_fputc(0x110000, myFile) != U_EOF) { in TestfgetsBuffers()
455 if (u_fputc((UChar32)0xFFFFFFFFu, myFile) != U_EOF) { in TestfgetsBuffers()
458 u_fputc(0xFF41, myFile); in TestfgetsBuffers()
463 u_file_write(buffer, expectedSize, myFile); in TestfgetsBuffers()
466 u_fclose(myFile); in TestfgetsBuffers()
469 myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "UTF-16"); in TestfgetsBuffers()
470 if (u_fgetc(myFile) != 0x3BC) { in TestfgetsBuffers()
473 if (u_fgetc(myFile) != 0xFF41) { in TestfgetsBuffers()
476 if (u_fgets(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile) != buffer) { in TestfgetsBuffers()
490 if (strcmp(u_fgetcodepage(myFile), "UTF-16") != 0) { in TestfgetsBuffers()
491 log_err("Got %s instead of UTF-16\n", u_fgetcodepage(myFile)); in TestfgetsBuffers()
493 u_fclose(myFile); in TestfgetsBuffers()
497 myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "UTF-8"); in TestfgetsBuffers()
499 u_fputc(0x3BC, myFile); in TestfgetsBuffers()
500 u_fputc(0xFF41, myFile); in TestfgetsBuffers()
505 u_file_write(buffer, expectedSize, myFile); in TestfgetsBuffers()
508 u_fclose(myFile); in TestfgetsBuffers()
511 myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "UTF-8"); in TestfgetsBuffers()
512 if (strcmp(u_fgetcodepage(myFile), "UTF-8") != 0) { in TestfgetsBuffers()
513 log_err("Got %s instead of UTF-8\n", u_fgetcodepage(myFile)); in TestfgetsBuffers()
515 if (u_fgetc(myFile) != 0x3BC) { in TestfgetsBuffers()
518 if (u_fgetc(myFile) != 0xFF41) { in TestfgetsBuffers()
521 if (u_fgets(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile) != buffer) { in TestfgetsBuffers()
535 u_fclose(myFile); in TestfgetsBuffers()
540 myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "UTF-8"); in TestfgetsBuffers()
542 u_fputc(0xFF41, myFile); in TestfgetsBuffers()
547 u_file_write(buffer, expectedSize, myFile); in TestfgetsBuffers()
550 u_fclose(myFile); in TestfgetsBuffers()
553 myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "UTF-8"); in TestfgetsBuffers()
554 if (u_fgets(buffer, 2, myFile) != buffer) { in TestfgetsBuffers()
568 u_fclose(myFile); in TestfgetsBuffers()
574 UFILE *myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "UTF-16"); in TestFileReadBuffering() local
580 u_file_write(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile); in TestFileReadBuffering()
583 u_fclose(myFile); in TestFileReadBuffering()
585 myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "UTF-16"); in TestFileReadBuffering()
586 how_many = u_file_read(buffer, 1024, myFile); in TestFileReadBuffering()
590 u_fclose(myFile); in TestFileReadBuffering()
598 UFILE *myFile = NULL; in TestfgetsLineCount() local
618 myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, NULL); in TestfgetsLineCount()
627 returnedUCharBuffer = u_fgets(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile); in TestfgetsLineCount()
650 u_fclose(myFile); in TestfgetsLineCount()
687 UFILE *myFile = NULL; in TestfgetsNewLineHandling() local
690 myFile = u_fopen(STANDARD_TEST_FILE, "wb", NULL, "UTF-8"); in TestfgetsNewLineHandling()
691 if (myFile == NULL) { in TestfgetsNewLineHandling()
696 u_file_write(testUStr[lineIdx], u_strlen(testUStr[lineIdx]), myFile); in TestfgetsNewLineHandling()
698 u_fclose(myFile); in TestfgetsNewLineHandling()
700 myFile = u_fopen(STANDARD_TEST_FILE, "rb", NULL, "UTF-8"); in TestfgetsNewLineHandling()
706 returnedUCharBuffer = u_fgets(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile); in TestfgetsNewLineHandling()
722 if (u_fgets(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile) != NULL) { in TestfgetsNewLineHandling()
725 u_fclose(myFile); in TestfgetsNewLineHandling()
734 UFILE *myFile = NULL; in TestLineCount() local
748 myFile = u_fopen(STANDARD_TEST_FILE, "rb", NULL, NULL); in TestLineCount()
749 if (myFile == NULL) { in TestLineCount()
756 returnedUCharBuffer = u_fgets(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile); in TestLineCount()
765 returnedUCharBuffer = u_fgets(buffer, sizeof(buffer)/sizeof(buffer[0]), myFile); in TestLineCount()
781 u_fclose(myFile); in TestLineCount()
798 UFILE *myFile = NULL; in TestFgetsLineBuffering() local
813 myFile = u_fopen(STANDARD_TEST_FILE, "rb", NULL, NULL); in TestFgetsLineBuffering()
814 if (myFile == NULL) { in TestFgetsLineBuffering()
820 returnedUCharBuffer = u_fgets(buffer, (sizeof(buffer)/sizeof(buffer[0]))-1, myFile); in TestFgetsLineBuffering()
830 u_fclose(myFile); in TestFgetsLineBuffering()
835 UFILE *myFile = NULL; in TestCodepage() local
843 myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "absurd converter that can't be opened"); in TestCodepage()
845 if (myFile) { in TestCodepage()
847 u_fclose(myFile); in TestCodepage()
850 myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "ISO-8859-1"); in TestCodepage()
851 if (myFile == NULL) { in TestCodepage()
855 if (strcmp("ISO-8859-1", u_fgetcodepage(myFile)) != 0) { in TestCodepage()
858 u_file_write(strABAccentA, u_strlen(strABAccentA), myFile); in TestCodepage()
859 u_fclose(myFile); in TestCodepage()
862 myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, NULL); in TestCodepage()
863 if (u_fsetcodepage("ISO-8859-1", myFile) != 0) { in TestCodepage()
866 retVal = u_file_read(testBuf, u_strlen(strABAccentA), myFile); in TestCodepage()
873 u_fclose(myFile); in TestCodepage()
876 myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "ISO-8859-1"); in TestCodepage()
877 if (strcmp(ucnv_getName(u_fgetConverter(myFile), &status), "ISO-8859-1") != 0) { in TestCodepage()
878 log_err("u_fgetConverter returned %s\n", ucnv_getName(u_fgetConverter(myFile), &status)); in TestCodepage()
880 if (u_fsetcodepage("UTF-8", myFile) != 0) { in TestCodepage()
883 if (strcmp(ucnv_getName(u_fgetConverter(myFile), &status), "UTF-8") != 0) { in TestCodepage()
884 log_err("u_fgetConverter returned %s\n", ucnv_getName(u_fgetConverter(myFile), &status)); in TestCodepage()
886 retVal = u_file_read(testBuf, u_strlen(strBadConversion), myFile); in TestCodepage()
890 u_fclose(myFile); in TestCodepage()
893 myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "ISO-8859-1"); in TestCodepage()
894 strcpy(convName, u_fgetcodepage(myFile)); in TestCodepage()
895 u_file_read(testBuf, 1, myFile); in TestCodepage()
896 if (u_fsetcodepage("UTF-8", myFile) == 0) { in TestCodepage()
899 retVal = u_file_read(testBuf + 1, u_strlen(strABAccentA) - 1, myFile); in TestCodepage()
906 u_frewind(myFile); in TestCodepage()
907 retVal = u_file_read(testBuf, u_strlen(strABAccentA), myFile); in TestCodepage()
914 u_fclose(myFile); in TestCodepage()
926 UFILE *myFile = u_fopen(STANDARD_TEST_FILE, "wb", STANDARD_TEST_LOCALE, enc); in TestCodepageFlush()
931 if (myFile == NULL) { in TestCodepageFlush()
936 u_fprintf(myFile, "%S", utf16String); in TestCodepageFlush()
937 u_fclose(myFile); in TestCodepageFlush()
983 UFILE *myFile = u_fopen(STANDARD_TEST_FILE, "wb", STANDARD_TEST_LOCALE, NULL); in TestFilePrintCompatibility() local
992 if (myFile == NULL) { in TestFilePrintCompatibility()
997 if (strcmp(u_fgetlocale(myFile), STANDARD_TEST_LOCALE) != 0) { in TestFilePrintCompatibility()
998 log_err("Got %s instead of en_US_POSIX for locale\n", u_fgetlocale(myFile)); in TestFilePrintCompatibility()
1004 u_fprintf(myFile, "%x ", num); in TestFilePrintCompatibility()
1005 u_fprintf(myFile, "%X ", num); in TestFilePrintCompatibility()
1006 u_fprintf(myFile, "%o ", num); in TestFilePrintCompatibility()
1007 u_fprintf(myFile, "%d ", num); in TestFilePrintCompatibility()
1008 u_fprintf(myFile, "%i ", num); in TestFilePrintCompatibility()
1009 u_fprintf(myFile, "%f ", (double)num); in TestFilePrintCompatibility()
1012 u_fprintf(myFile, "%g ", (double)num); in TestFilePrintCompatibility()
1013 u_fprintf(myFile, "%G", (double)num); in TestFilePrintCompatibility()
1014 u_fputs(emptyStr, myFile); in TestFilePrintCompatibility()
1017 u_fprintf_u(myFile, NEW_LINE); in TestFilePrintCompatibility()
1020 u_fprintf(myFile, "%c", num); in TestFilePrintCompatibility()
1023 u_fclose(myFile); in TestFilePrintCompatibility()
1121 myFile = u_fopen(STANDARD_TEST_FILE, "w", STANDARD_TEST_LOCALE, NULL);\
1122 if (myFile == NULL) {\
1130 uNumPrinted = u_fprintf(myFile, uFormat, uValue);\
1131 u_fclose(myFile);\
1132 myFile = u_fopen(STANDARD_TEST_FILE, "r", STANDARD_TEST_LOCALE, NULL);\
1133 u_fgets(uBuffer, sizeof(uBuffer)/sizeof(*uBuffer), myFile);\
1134 u_fclose(myFile);\
1156 UFILE *myFile; in TestFprintfFormat() local
1263 myFile = u_fopen(STANDARD_TEST_FILE, "w", STANDARD_TEST_LOCALE, NULL); in TestFprintfFormat()
1268 uNumPrinted = u_fprintf(myFile, "%d % d %d", -1234, 1234, 1234); in TestFprintfFormat()
1269 u_fclose(myFile); in TestFprintfFormat()
1270 myFile = u_fopen(STANDARD_TEST_FILE, "r", STANDARD_TEST_LOCALE, NULL); in TestFprintfFormat()
1271 u_fgets(uBuffer, sizeof(uBuffer)/sizeof(*uBuffer), myFile); in TestFprintfFormat()
1272 u_fclose(myFile); in TestFprintfFormat()
1291 UFILE *myFile; in TestFScanSetFormat() local
1298 myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, NULL); in TestFScanSetFormat()
1299 if (myFile == NULL) { in TestFScanSetFormat()
1309 u_fprintf(myFile, "%S", uValue); in TestFScanSetFormat()
1310 u_fclose(myFile); in TestFScanSetFormat()
1311 myFile = u_fopen(STANDARD_TEST_FILE, "r", STANDARD_TEST_LOCALE, NULL); in TestFScanSetFormat()
1312 uNumScanned = u_fscanf(myFile, format, uBuffer); in TestFScanSetFormat()
1313 u_fclose(myFile); in TestFScanSetFormat()
1381 UFILE *myFile; in TestBadFScanfFormat() local
1385 myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, NULL); in TestBadFScanfFormat()
1386 if (myFile == NULL) { in TestBadFScanfFormat()
1394 u_fprintf(myFile, "%S", uValue); in TestBadFScanfFormat()
1395 u_fclose(myFile); in TestBadFScanfFormat()
1396 myFile = u_fopen(STANDARD_TEST_FILE, "r", STANDARD_TEST_LOCALE, NULL); in TestBadFScanfFormat()
1397 uNumScanned = u_fscanf(myFile, format, uBuffer); in TestBadFScanfFormat()
1398 u_fclose(myFile); in TestBadFScanfFormat()
1418 UFILE *myFile; in Test_u_vfprintf() local
1420 myFile = u_fopen(STANDARD_TEST_FILE, "w", STANDARD_TEST_LOCALE, "UTF-8"); in Test_u_vfprintf()
1421 if (!myFile) { in Test_u_vfprintf()
1427 count = u_vfprintf(myFile, format, ap); in Test_u_vfprintf()
1431 u_fclose(myFile); in Test_u_vfprintf()
1434 myFile = u_fopen(STANDARD_TEST_FILE, "r", STANDARD_TEST_LOCALE, "UTF-8"); in Test_u_vfprintf()
1435 if (!myFile) { in Test_u_vfprintf()
1439 u_fgets(uBuffer, sizeof(uBuffer)/sizeof(*uBuffer), myFile); in Test_u_vfprintf()
1444 u_fclose(myFile); in Test_u_vfprintf()
1447 myFile = u_fopen(STANDARD_TEST_FILE, "w", STANDARD_TEST_LOCALE, NULL); in Test_u_vfprintf()
1448 if (!myFile) { in Test_u_vfprintf()
1455 count = u_vfprintf_u(myFile, uBuffer, ap); in Test_u_vfprintf()
1458 u_fclose(myFile); in Test_u_vfprintf()
1461 myFile = u_fopen(STANDARD_TEST_FILE, "r", STANDARD_TEST_LOCALE, NULL); in Test_u_vfprintf()
1462 if (!myFile) { in Test_u_vfprintf()
1466 u_fgets(uBuffer, sizeof(uBuffer)/sizeof(*uBuffer), myFile); in Test_u_vfprintf()
1471 u_fclose(myFile); in Test_u_vfprintf()
1484 UFILE *myFile; in TestUnicodeFormat() local
1490 myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, "UTF-8"); in TestUnicodeFormat()
1491 if (!myFile) { in TestUnicodeFormat()
1495 u_fprintf_u(myFile, PERCENT_S, TEST_STR); in TestUnicodeFormat()
1496 u_fclose(myFile); in TestUnicodeFormat()
1498 myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, "UTF-8"); in TestUnicodeFormat()
1499 if (!myFile) { in TestUnicodeFormat()
1503 u_fscanf_u(myFile, PERCENT_S, myUString); in TestUnicodeFormat()
1504 u_fclose(myFile); in TestUnicodeFormat()
1513 UFILE * myFile; in TestFileWriteRetval() local
1529 myFile = u_fopen(STANDARD_TEST_FILE, "w", NULL, a_pszEncoding); in TestFileWriteRetval()
1530 if (!myFile) { in TestFileWriteRetval()
1536 count = u_file_write(buffer, expected, myFile); in TestFileWriteRetval()
1537 u_fclose(myFile); in TestFileWriteRetval()
1548 myFile = u_fopen(STANDARD_TEST_FILE, "r", NULL, a_pszEncoding); in TestFileWriteRetval()
1549 if (!myFile) { in TestFileWriteRetval()
1554 UChar gotChar = u_fgetc(myFile); in TestFileWriteRetval()
1557 u_fclose(myFile); in TestFileWriteRetval()
1561 if (u_fgetc(myFile) != U_EOF) { in TestFileWriteRetval()
1563 u_fclose(myFile); in TestFileWriteRetval()
1566 u_fclose(myFile); in TestFileWriteRetval()