Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: tko/parsers/version_0_unittest.py

Issue 3719002: Add support for multi-line status messages. (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tko/parsers/version_0.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tko/parsers/version_0_unittest.py
diff --git a/tko/parsers/version_0_unittest.py b/tko/parsers/version_0_unittest.py
index 4807beecb67d0283844a458ece68a1b420ccc96a..abf7b676309566d837a5577e57e8ec11292ff5ae 100755
--- a/tko/parsers/version_0_unittest.py
+++ b/tko/parsers/version_0_unittest.py
@@ -230,6 +230,20 @@ class test_status_line(unittest.TestCase):
"field2": "val2"})
+ def test_parse_line_handles_embedded_new_lines(self):
+ input_data = ("\tEND FAIL\t----\ttest\tfield1=val1\tStatus\nwith\n"
+ "embedded\nnew lines\n")
+
+ line = version_0.status_line.parse_line(input_data)
+ self.assertEquals(line.indent, 1)
+ self.assertEquals(line.type, "END")
+ self.assertEquals(line.status, "FAIL")
+ self.assertEquals(line.subdir, None)
+ self.assertEquals(line.testname, "test")
+ self.assertEquals(line.reason, "Status\nwith\nembedded\nnew lines")
+ self.assertEquals(line.optional_fields, {"field1": "val1"})
+
+
def test_parse_line_fails_on_untabbed_lines(self):
input_data = " GOOD\trandom\tfields\tof text"
line = version_0.status_line.parse_line(input_data)
« no previous file with comments | « tko/parsers/version_0.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698