8000 test: failing diff stat test. · libgit2/libgit2@31f5c30 · GitHub
[go: up one dir, main page]

Skip to content

Commit 31f5c30

Browse files
committed
test: failing diff stat test.
1 parent 21a351b commit 31f5c30

File tree

10 files changed

+23
-2
lines changed

10 files changed

+23
-2
lines changed

tests/libgit2/diff/stats.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,26 @@ void test_diff_stats__rename_in_subdirectory(void)
229229
git_buf_dispose(&buf);
230230
}
231231

232+
void test_diff_stats__rename_in_subdirectory_aligns(void)
233+
{
234+
git_buf buf = GIT_BUF_INIT;
235+
const char *stat =
236+
" dir/{renamed.txt => rerenamed.txt} | 0\n"
237+
" file3.txt | 2 +-\n"
238+
" 2 files changed, 1 insertion(+), 1 deletion(-)\n";
239+
240+
diff_stats_from_commit_oid(
241+
&_stats, "7f4c6d9d6ba363e3352f7c21807ca3a7835072b2", true);
242+
243+
cl_assert_equal_sz(2, git_diff_stats_files_changed(_stats));
244+
cl_assert_equal_sz(1, git_diff_stats_insertions(_stats));
245+
cl_assert_equal_sz(1, git_diff_stats_deletions(_stats));
246+
247+
cl_git_pass(git_diff_stats_to_buf(&buf, _stats, GIT_DIFF_STATS_FULL, 0));
248+
cl_assert_equal_s(stat, buf.ptr);
249+
git_buf_dispose(&buf);
250+
}
251+
232252
void test_diff_stats__rename_no_find(void)
233253
{
234254
git_buf buf = GIT_BUF_INIT;
0 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
x��Kj1Eь���L���Z��[�JǢ�R��@v�����<�/�m�������Ƈ ѡ�Ʊ-�0�6H̚B�$��e�6�.rӒ8����z�hY�%��<���ۯ�����c��֟�ʺJ9��֐!�޵FT�Y8�+[�7ʶ������s -C�J�*0z��I�N�
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0db2a262bc8c5c3cba55254730045a8258da7a37
1+
7f4c6d9d6ba363e3352f7c21807ca3a7835072b2

tests/resources/diff_format_email/file3.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ file3
44
file3
55
file3
66
file3
7-
file3
7+
file3?

0 commit comments

Comments
 (0)
0