Files
GitJournal/test/merge_conflcts_resolver_test.dart
Vishesh Handa ec959ebbed Add a helper file to resolve merge conflicts
I'm not sure how to integrate this into our merging code.
2020-01-27 23:28:13 +01:00

36 lines
682 B
Dart

import 'package:test/test.dart';
import 'package:gitjournal/utils/merge_conflict_resolver.dart';
void main() {
test("Body only conflict", () {
String input = '''---
title: Foo
---
<<<<<<< HEAD
This is the body in GitJournal
=======
This is the body from the remote/origin
>>>>>>> remote/origin
Some more text.''';
String expectedOutput = '''---
title: Foo
---
This is the body in GitJournal
Some more text.''';
expect(resolveMergeConflict(input), equals(expectedOutput));
});
/*
test("YAML Conflict", () {});
test("YAML Conflict from 1st line", () {});
test("YAML Conflict different modified", () {});
test("YAML and body conflict", () {});
*/
}