mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-15 07:56:11 +08:00
37 lines
683 B
Dart
37 lines
683 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", () {});
|
|
*/
|
|
}
|