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

Unified Diff: dart/tests/try/poi/source_update_test.dart

Issue 809363002: Parse merge conflict format for multi diffs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42456 Created 6 years 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 | « dart/tests/try/poi/source_update.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/try/poi/source_update_test.dart
diff --git a/dart/tests/try/poi/source_update_test.dart b/dart/tests/try/poi/source_update_test.dart
index 9bd2893bf9088a8bdf3ca9ec19f73734dcc1f034..1b279bdeffc79811263731e07c47d5f788c723f1 100644
--- a/dart/tests/try/poi/source_update_test.dart
+++ b/dart/tests/try/poi/source_update_test.dart
@@ -12,6 +12,7 @@ import 'package:expect/expect.dart' show
Expect;
import 'source_update.dart' show
+ expandDiff,
expandUpdates,
splitFiles,
splitLines;
@@ -68,4 +69,52 @@ Third line of file 2.
Expect.stringEquals('["\\n"]', JSON.encode(splitLines("\n")));
Expect.stringEquals('["\\n","1"]', JSON.encode(splitLines("\n1")));
+
+ Expect.stringEquals(
+ '["","",""]',
+ JSON.encode(expandUpdates(expandDiff(r"""
+<<<<<<<
+=======
+=======
+>>>>>>>
+"""))));
+
+ Expect.stringEquals(
+ r'["first\nv1\nlast\n","first\nv2\nlast\n","first\nv3\nlast\n"]',
+ JSON.encode(expandUpdates(expandDiff(r"""
+first
+<<<<<<<
+v1
+=======
+v2
+=======
+v3
+>>>>>>>
+last
+"""))));
+
+ Expect.stringEquals(
+ r'["v1\nlast\n","v2\nlast\n","v3\nlast\n"]',
+ JSON.encode(expandUpdates(expandDiff(r"""
+<<<<<<<
+v1
+=======
+v2
+=======
+v3
+>>>>>>>
+last
+"""))));
+
+ Expect.stringEquals(
+ r'["v1\n","v2\n","v3\n"]',
+ JSON.encode(expandUpdates(expandDiff(r"""
+<<<<<<<
+v1
+=======
+v2
+=======
+v3
+>>>>>>>
+"""))));
}
« no previous file with comments | « dart/tests/try/poi/source_update.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698