Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
test: modernize style of t4006
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Tue, 1 May 2012 17:10:12 +0000
(19:10 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 1 May 2012 18:01:47 +0000
(11:01 -0700)
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4006-diff-mode.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
9768caf
)
diff --git
a/t/t4006-diff-mode.sh
b/t/t4006-diff-mode.sh
index ff8c2f7532aa6fd748dbbdc0322384576f3a35ed..b85f622e7c4c934eeee826ac425be67376e27bde 100755
(executable)
--- a/
t/t4006-diff-mode.sh
+++ b/
t/t4006-diff-mode.sh
@@
-8,23
+8,21
@@
test_description='Test mode change diffs.
'
. ./test-lib.sh
'
. ./test-lib.sh
-test_expect_success \
- 'setup' \
- 'echo frotz >rezrov &&
- git update-index --add rezrov &&
- tree=`git write-tree` &&
- echo $tree'
+sed_script='s/\(:100644 100755\) \('"$_x40"'\) \2 /\1 X X /'
-test_expect_success \
- 'chmod' \
- 'test_chmod +x rezrov &&
- git diff-index $tree >current'
-
-sed -e 's/\(:100644 100755\) \('"$_x40"'\) \2 /\1 X X /' <current >check
-echo ":100644 100755 X X M rezrov" >expected
+test_expect_success 'setup' '
+ echo frotz >rezrov &&
+ git update-index --add rezrov &&
+ tree=`git write-tree` &&
+ echo $tree
+'
-test_expect_success \
- 'verify' \
- 'test_cmp expected check'
+test_expect_success 'chmod' '
+ test_chmod +x rezrov &&
+ git diff-index $tree >current &&
+ sed -e "$sed_script" <current >check &&
+ echo ":100644 100755 X X M rezrov" >expected &&
+ test_cmp expected check
+'
test_done
test_done