From 9a10880166445bafcc80e8c89057e48876359e5a Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 5 Apr 2013 11:30:02 -0400 Subject: File: handle Path type="file" entries with no text content even if empty is not set --- .../Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'testsuite/Testsrc/Testlib/TestClient/TestTools') diff --git a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py index 662e0e1b6..8f933e08f 100644 --- a/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py +++ b/testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIX/TestFile.py @@ -63,10 +63,18 @@ class TestPOSIXFile(TestPOSIXTool): entry.set("encoding", "base64") self.assertEqual(ptool._get_data(entry), ("test", True)) + entry = copy.deepcopy(orig_entry) + entry.set("encoding", "base64") + entry.set("empty", "true") + self.assertEqual(ptool._get_data(entry), ("", True)) + entry = copy.deepcopy(orig_entry) entry.set("empty", "true") self.assertEqual(ptool._get_data(entry), ("", False)) + entry = copy.deepcopy(orig_entry) + self.assertEqual(ptool._get_data(entry), ("", False)) + entry = copy.deepcopy(orig_entry) entry.text = "test" self.assertEqual(ptool._get_data(entry), ("test", False)) -- cgit v1.2.3-1-g7c22