[glom] test_document_export_po: Test a special character.



commit 82bc7d790c64bced5e7d18f30d7c2ace0cd6da58
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Jan 9 12:25:56 2012 +0100

    test_document_export_po: Test a special character.
    
    * tests/translations_po/test_document_export_po.cc:
    Demonstrate that the po file export currently drops non-ASCII characters.
      Apparently there is no way to tell po_file_write() to use UTF-8 encoding,
      though that can be affected by code that uses the libgettext-po source code
      itself, by setting output_format_po.requires_utf8.

 ChangeLog                                        |   10 ++++++++++
 tests/translations_po/test_document_export_po.cc |    6 +++++-
 2 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 75761f2..68d6b6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2012-01-09  Murray Cumming  <murrayc murrayc com>
 
+	test_document_export_po: Test a special character.
+
+	* tests/translations_po/test_document_export_po.cc:
+	Demonstrate that the po file export currently drops non-ASCII characters.
+  Apparently there is no way to tell po_file_write() to use UTF-8 encoding, 
+  though that can be affected by code that uses the libgettext-po source code 
+  itself, by setting output_format_po.requires_utf8.
+
+2012-01-09  Murray Cumming  <murrayc murrayc com>
+
 	Add glom_import_po_all command-line utility.
 
 	* glom/libglom/translations_po.cc: write_translations_to_po_file():
diff --git a/tests/translations_po/test_document_export_po.cc b/tests/translations_po/test_document_export_po.cc
index b6c0bb3..f9ef21c 100644
--- a/tests/translations_po/test_document_export_po.cc
+++ b/tests/translations_po/test_document_export_po.cc
@@ -142,9 +142,13 @@ int main()
     return EXIT_FAILURE;
   }
 
-  const bool text_found =
+  bool text_found =
     (data.find("Stabliste") != std::string::npos);
   g_assert(text_found);
+  
+  text_found =
+    (data.find("\u00DCbersicht") != std::string::npos);
+  g_assert(text_found);
 
 
   //Check that the .po file is valid:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]