From 3e1ae89cf6f750ac088a3b73ed6ef1559e2d436f Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 24 Nov 2014 18:27:54 -0800 Subject: tests: Add a test for load_file with wide Unicode name --- tests/test_document.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/test_document.cpp') diff --git a/tests/test_document.cpp b/tests/test_document.cpp index 4228602..5991937 100644 --- a/tests/test_document.cpp +++ b/tests/test_document.cpp @@ -323,6 +323,16 @@ TEST(document_load_file_wide_ascii) CHECK_NODE(doc, STR("")); } +#if !defined(__DMC__) && !defined(__MWERKS__) +TEST(document_load_file_wide_unicode) +{ + pugi::xml_document doc; + + CHECK(doc.load_file(L"tests/data/\x0442\x0435\x0441\x0442.xml")); + CHECK_NODE(doc, STR("")); +} +#endif + TEST(document_load_file_wide_out_of_memory) { test_runner::_memory_fail_threshold = 1; -- cgit v1.2.3 From b7a1feccf79f953b107696841d66666cba5fa8e4 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Mon, 24 Nov 2014 20:49:12 -0800 Subject: Use _wfopen and fseeko64 on MinGW in C++11 mode Since MinGW 4.5 does not define these functions if __STRICT_ANSI__ is defined (in case of _wfopen it defines it inconsistently between stdio.h and wchar.h) use the baseline functions for MinGW 4.5 and earlier. Fixes #23. --- tests/test_document.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/test_document.cpp') diff --git a/tests/test_document.cpp b/tests/test_document.cpp index 5991937..f57465f 100644 --- a/tests/test_document.cpp +++ b/tests/test_document.cpp @@ -323,7 +323,7 @@ TEST(document_load_file_wide_ascii) CHECK_NODE(doc, STR("")); } -#if !defined(__DMC__) && !defined(__MWERKS__) +#if !defined(__DMC__) && !defined(__MWERKS__) && !(defined(__MINGW32__) && defined(__STRICT_ANSI__) && __GNUC__ * 100 + __GNUC_MINOR__ <= 405) TEST(document_load_file_wide_unicode) { pugi::xml_document doc; -- cgit v1.2.3