Add several testcases for --dirstat and friends
commit5502039d87337e076e69f7de949cb0e0360de16f
authorJohan Herland <johan@herland.net>
Fri, 29 Apr 2011 09:36:16 +0000 (29 11:36 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 29 Apr 2011 18:17:36 +0000 (29 11:17 -0700)
treed909fd157d963412478e7602e6b14ee31c964cf7
parentc54e6be75ae90e2be45c32f4d1949fff59ad7d9d
Add several testcases for --dirstat and friends

Currently, t4013 is the only selftest that exercises the --dirstat machinery,
but it only does a superficial verification of --dirstat's output.

This patch adds a new selftest - t4047-diff-dirstat.sh - which prepares a
commit containing:
 - unchanged files, changed files and files with rearranged lines
 - copied files, moved files, and unmoved files

It then verifies the correct dirstat output for that commit in the following
dirstat modes:
 - --dirstat
 - -X
 - --dirstat=0
 - -X0
 - --cumulative
 - --dirstat-by-file
 - (plus combinations of the above)

Each of the above tests are also run with:
 - no rename detection
 - rename detection (-M)
 - expensive copy detection (-C -C)

Improved-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4047-diff-dirstat.sh [new file with mode: 0755]