mirror of
https://github.com/bluekeyes/go-gitdiff
synced 2026-06-08 13:18:30 +00:00
Add simple full file parsing test
For now, this uses JSON to print objects on error, which is hard to debug. It should probably use something like google/go-cmp instead, because these objects are now too large for direct comparison.
This commit is contained in:
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
commit 5d9790fec7d95aa223f3d20936340bf55ff3dcbe
|
||||
Author: Morton Haypenny <mhaypenny@example.com>
|
||||
Date: Tue Apr 2 22:55:40 2019 -0700
|
||||
|
||||
A single file with multiple fragments.
|
||||
|
||||
The content is arbitrary.
|
||||
|
||||
diff --git a/dir/file.txt b/dir/file.txt
|
||||
index ebe9fa54..fe103e1d 100644
|
||||
--- a/dir/file.txt
|
||||
+++ b/dir/file.txt
|
||||
@@ -3,6 +3,8 @@ fragment 1
|
||||
context line
|
||||
-old line 1
|
||||
-old line 2
|
||||
context line
|
||||
+new line 1
|
||||
+new line 2
|
||||
+new line 3
|
||||
context line
|
||||
-old line 3
|
||||
+new line 4
|
||||
+new line 5
|
||||
@@ -31,2 +33,2 @@ fragment 2
|
||||
context line
|
||||
-old line 4
|
||||
+new line 6
|
||||
Reference in New Issue
Block a user