[PATCH] tests: make sure rename pretty print works
- From
Antoine Pelisse <apelisse@gmail.com>
- Date
- Mar 2, 2013, 14:38 UTC
- Message-ID
- <1362235092-16914-1-git-send-email-apelisse@gmail.com>
- In-Reply-To
- <7vip5cgjhp.fsf@alter.siamese.dyndns.org>
Add basic use cases and corner cases tests for "git diff -M --summary/stat".
Signed-off-by: Antoine Pelisse <apelisse@gmail.com> --- t/t4056-rename-pretty.sh | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 t/t4056-rename-pretty.sh
diff --git a/t/t4056-rename-pretty.sh b/t/t4056-rename-pretty.sh new file mode 100755 index 0000000..806046f --- /dev/null +++ b/t/t4056-rename-pretty.sh @@ -0,0 +1,54 @@ +#!/bin/sh + +test_description='Rename pretty print + +' + +. ./test-lib.sh + +test_expect_success nothing_common ' + mkdir -p a/b/ && + : >a/b/c && + git add a/b/c && + git commit -m. && + mkdir -p c/b/ && + git mv a/b/c c/b/a && + git commit -m. && + git show -M --summary >output && + test_i18ngrep "a/b/c => c/b/a" output +' + +test_expect_success common_prefix ' + mkdir -p c/d && + git mv c/b/a c/d/e && + git commit -m. && + git show -M --summary >output && + test_i18ngrep "c/{b/a => d/e}" output +' + +test_expect_success common_suffix ' + mkdir d && + git mv c/d/e d/e && + git commit -m. && + git show -M --summary >output && + test_i18ngrep "{c/d => d}/e" output +' + +test_expect_success common_suffix_prefix ' + mkdir d/f && + git mv d/e d/f/e && + git commit -m. && + git show -M --summary >output && + test_i18ngrep "d/{ => f}/e" output +' + +test_expect_success common_overlap ' + mkdir d/f/f && + git mv d/f/e d/f/f/e && + git commit -m. && + git show -M --summary >output && + test_i18ngrep "d/f/{ => f}/e" output +' + + +test_done
-- 1.7.9.5