MSVCRT: Add test case for BUG 8598
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Sun Jan 10 13:25:08 CST 2010
---
dlls/msvcrt/tests/printf.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/dlls/msvcrt/tests/printf.c b/dlls/msvcrt/tests/printf.c
index cea4db3..72add3f 100644
--- a/dlls/msvcrt/tests/printf.c
+++ b/dlls/msvcrt/tests/printf.c
@@ -601,6 +601,25 @@ static void test_snprintf (void)
};
}
+/* fopen without additional ",ccs=<encoding>" mode string opens files
+ * in ANSI mode
+ */
+static void test_fwprintf(void)
+{
+ long size;
+ const wchar_t teststr[] = {'T','e','s','t','\n', 0};
+ FILE * fp = fopen("fwprintf.txt", "w");
+ fwprintf(fp, teststr);
+ fclose(fp);
+ fp = fopen("fwprintf.txt", "rt");
+ fseek(fp,0, SEEK_END);
+ size = ftell(fp);
+ todo_wine ok (size == lstrlenW(teststr) +1,
+ "fwprintf on byte oriented stream failed\n");
+ fclose (fp);
+ unlink("fwprintf.txt");
+}
+
static void test_fcvt(void)
{
char *str;
@@ -857,6 +876,7 @@ START_TEST(printf)
test_sprintf();
test_swprintf();
test_snprintf();
+ test_fwprintf();
test_fcvt();
test_xcvt();
test_vsnwprintf();
--
1.6.4.2
More information about the wine-patches
mailing list