this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add a test for removing the last newline in a file (#59)

This worked, but completes the test coverage in combination with the
test that adds a final newline and one that leaves the missing newline
in place.

authored by

Billy Keyes and committed by
GitHub
823d31db fffa3cca

+17
+1
gitdiff/apply_test.go
··· 22 22 "changeStart": {Files: getApplyFiles("text_fragment_change_start")}, 23 23 "changeMiddle": {Files: getApplyFiles("text_fragment_change_middle")}, 24 24 "changeEnd": {Files: getApplyFiles("text_fragment_change_end")}, 25 + "changeEndEOL": {Files: getApplyFiles("text_fragment_change_end_eol")}, 25 26 "changeExact": {Files: getApplyFiles("text_fragment_change_exact")}, 26 27 "changeSingleNoEOL": {Files: getApplyFiles("text_fragment_change_single_noeol")}, 27 28
+3
gitdiff/testdata/apply/text_fragment_change_end_eol.out
··· 1 + line 1 2 + line 2 3 + line 3
+10
gitdiff/testdata/apply/text_fragment_change_end_eol.patch
··· 1 + diff --git a/gitdiff/testdata/apply/text_fragment_remove_last_eol.src b/gitdiff/testdata/apply/text_fragment_remove_last_eol.src 2 + index a92d664..8cf2f17 100644 3 + --- a/gitdiff/testdata/apply/text_fragment_remove_last_eol.src 4 + +++ b/gitdiff/testdata/apply/text_fragment_remove_last_eol.src 5 + @@ -1,3 +1,3 @@ 6 + line 1 7 + line 2 8 + -line 3 9 + +line 3 10 + \ No newline at end of file
+3
gitdiff/testdata/apply/text_fragment_change_end_eol.src
··· 1 + line 1 2 + line 2 3 + line 3