Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(109)

Issue 65: xliff2po & po2xliff should handle context

Unified Diff

File: translate/storage/test_cpo.py
Patch Set: A more complete patch, supporting CPO and pypo Created 1 year, 4 months ago
Jump to:
View side by-side-diff with in line comments
Index: translate/storage/test_cpo.py
===================================================================
--- translate/storage/test_cpo.py	(revision 7897)
+++ translate/storage/test_cpo.py	(working copy)
@@ -72,6 +72,17 @@
         unit.addnote("# Double commented comment")
         assert unit.getnotes() == "# Double commented comment"
 
+    def test_context(self):
+        """tests if we handle msgctxt properly"""
+        unit = self.UnitClass("content")
+        assert unit.getcontext() == ""
+
+        unit.setcontext("content context")
+        assert unit.getcontext() == "content context"
+
+        unit.setcontext("")
+        assert unit.getcontext() == ""
+
 class TestCPOFile(test_po.TestPOFile):
     StoreClass = cpo.pofile
     def test_msgidcomments(self):

Powered by Google App Engine
This is Rietveld r159