File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,6 +155,37 @@ twigSplitTest() {
155155 cd ../
156156}
157157
158+ filemodeTest () {
159+ rm -rf filemode
160+ mkdir filemode
161+ cd filemode
162+ git init > /dev/null
163+
164+ switchAsSammy " Sat, 24 Nov 1973 19:01:02 +0200" " Sat, 24 Nov 1973 19:11:22 +0200"
165+ echo " a" > a
166+ git add a
167+ git commit -m" added a" > /dev/null
168+
169+ switchAsFred " Sat, 24 Nov 1973 20:01:02 +0200" " Sat, 24 Nov 1973 20:11:22 +0200"
170+ mkdir b/
171+ echo " b" > b/b
172+ chmod +x b/b
173+ git add b
174+ git commit -m" added b" > /dev/null
175+
176+ $LITE_PATH --prefix=b/::not-important:also-not-important --target refs/heads/split 2> /dev/null
177+ FILEMODE=` git ls-tree -r --format=' %(objectmode)' split b`
178+
179+ if test " $FILEMODE " = " 100755" ; then
180+ echo " Test #6 - OK"
181+ else
182+ echo " Test #6 - NOT OK"
183+ exit 1
184+ fi
185+
186+ cd ../
187+ }
188+
158189LITE_PATH=` pwd` /splitsh-lite
159190if [ ! -e $LITE_PATH ]; then
160191 echo " You first need to compile the splitsh-lite binary"
@@ -169,3 +200,4 @@ cd splitter-lite-tests
169200simpleTest
170201mergeTest
171202twigSplitTest
203+ filemodeTest
You can’t perform that action at this time.
0 commit comments