[PATCH] Add tests for git-mv in subdirectories
Junio C Hamano, Sat, Nov 26, 2005 03:45:52 +0100: > I haven't seriously used git-mv myself, so > somebody needs to test it, and if it actually works and Ack on > it, please. It actually works in subdirs. Signed-off-by: Junio C Hamano <junkio@cox.net>
Alex Riesen committed
Nov 29, 2005 at 23:10 UTC
8bf2c69c2dd7430944898fa23edb8562c75c57e0
1 file changed
+27
t/t7001-mv.sh
new
+27
@@ -0,0 +1,27 @@
1
+#!/bin/sh
2
+
3
+test_description='git-mv in subdirs'
4
+. ./test-lib.sh
5
+
6
+test_expect_success \
7
+ 'prepare reference tree' \
8
+ 'mkdir path0 path1 &&
9
+ cp ../../COPYING path0/COPYING &&
10
+ git-add path0/COPYING &&
11
+ git-commit -m add -a'
12
+
13
+test_expect_success \
14
+ 'moving the file' \
15
+ 'cd path0 && git-mv COPYING ../path1/COPYING'
16
+
17
+# in path0 currently
18
+test_expect_success \
19
+ 'commiting the change' \
20
+ 'cd .. && git-commit -m move -a'
21
+
22
+test_expect_success \
23
+ 'checking the commit' \
24
+ 'git-diff-tree -r -M --name-status HEAD^ HEAD | \
25
+ grep -E "^R100.+path0/COPYING.+path1/COPYING"'
26
+
27
+test_done