summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-01-05 20:52:50 -0800
committerLibravatar Junio C Hamano <junkio@cox.net>2006-01-05 20:52:50 -0800
commit92e802c6ccb96d1b5e8561b0a136d43d82253293 (patch)
tree9b6c265d69d1dc8bcce36c86a44674cfb010a6d7 /t
parentGIT 1.0.6 (diff)
parentFix git-symbolic-ref typo in git.txt. (diff)
downloadtgif-92e802c6ccb96d1b5e8561b0a136d43d82253293.tar.xz
GIT 1.0.7
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-rwxr-xr-xt/t3300-funny-names.sh9
-rwxr-xr-xt/t4000-diff-format.sh8
-rwxr-xr-xt/t4006-diff-mode.sh20
-rwxr-xr-xt/t4102-apply-rename.sh9
-rwxr-xr-xt/t6001-rev-list-merge-order.sh14
-rwxr-xr-xt/test-lib.sh2
6 files changed, 44 insertions, 18 deletions
diff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh
index 6a85d67c57..72a93da08c 100755
--- a/t/t3300-funny-names.sh
+++ b/t/t3300-funny-names.sh
@@ -9,9 +9,6 @@ This test tries pathnames with funny characters in the working
tree, index, and tree objects.
'
-# since FAT/NTFS does not allow tabs in filenames, skip this test
-test "$(uname -o 2>/dev/null)" = Cygwin && exit 0
-
. ./test-lib.sh
p0='no-funny'
@@ -27,6 +24,12 @@ EOF
cat >"$p1" "$p0"
echo 'Foo Bar Baz' >"$p2"
+test -f "$p1" && cmp "$p0" "$p1" || {
+ # since FAT/NTFS does not allow tabs in filenames, skip this test
+ say 'Your filesystem does not allow tabs in filenames, test skipped.'
+ test_done
+}
+
echo 'just space
no-funny' >expected
test_expect_success 'git-ls-files no-funny' \
diff --git a/t/t4000-diff-format.sh b/t/t4000-diff-format.sh
index beb6d8f487..67b9681d36 100755
--- a/t/t4000-diff-format.sh
+++ b/t/t4000-diff-format.sh
@@ -26,6 +26,14 @@ rm -f path1
test_expect_success \
'git-diff-files -p after editing work tree.' \
'git-diff-files -p >current'
+
+# that's as far as it comes
+if [ "$(git repo-config --get core.filemode)" = false ]
+then
+ say 'filemode disabled on the filesystem'
+ test_done
+fi
+
cat >expected <<\EOF
diff --git a/path0 b/path0
old mode 100644
diff --git a/t/t4006-diff-mode.sh b/t/t4006-diff-mode.sh
index e2a67e9633..8ad69d1115 100755
--- a/t/t4006-diff-mode.sh
+++ b/t/t4006-diff-mode.sh
@@ -15,11 +15,21 @@ test_expect_success \
tree=`git-write-tree` &&
echo $tree'
-test_expect_success \
- 'chmod' \
- 'chmod +x rezrov &&
- git-update-index rezrov &&
- git-diff-index $tree >current'
+if [ "$(git repo-config --get core.filemode)" = false ]
+then
+ say 'filemode disabled on the filesystem, using update-index --chmod=+x'
+ test_expect_success \
+ 'git-update-index --chmod=+x' \
+ 'git-update-index rezrov &&
+ git-update-index --chmod=+x rezrov &&
+ git-diff-index $tree >current'
+else
+ test_expect_success \
+ 'chmod' \
+ 'chmod +x rezrov &&
+ git-update-index rezrov &&
+ git-diff-index $tree >current'
+fi
_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
diff --git a/t/t4102-apply-rename.sh b/t/t4102-apply-rename.sh
index 0401d7bbc6..fbb508d389 100755
--- a/t/t4102-apply-rename.sh
+++ b/t/t4102-apply-rename.sh
@@ -31,7 +31,12 @@ test_expect_success setup \
test_expect_success apply \
'git-apply --index --stat --summary --apply test-patch'
-test_expect_success validate \
- 'test -f bar && ls -l bar | grep "^-..x......"'
+if [ "$(git repo-config --get core.filemode)" = false ]
+then
+ say 'filemode disabled on the filesystem'
+else
+ test_expect_success validate \
+ 'test -f bar && ls -l bar | grep "^-..x......"'
+fi
test_done
diff --git a/t/t6001-rev-list-merge-order.sh b/t/t6001-rev-list-merge-order.sh
index 368b8d9e02..7724e8a8c5 100755
--- a/t/t6001-rev-list-merge-order.sh
+++ b/t/t6001-rev-list-merge-order.sh
@@ -8,13 +8,6 @@ test_description='Tests git-rev-list --merge-order functionality'
. ./test-lib.sh
. ../t6000lib.sh # t6xxx specific functions
-if git-rev-list --merge-order 2>&1 | grep 'OpenSSL not linked' >/dev/null
-then
- test_expect_success 'skipping merge-order test' :
- test_done
- exit
-fi
-
# test-case specific test function
check_adjacency()
{
@@ -114,6 +107,13 @@ test_output_expect_success 'rev-list has correct number of entries' 'git-rev-lis
19
EOF
+if git-rev-list --merge-order HEAD 2>&1 | grep 'OpenSSL not linked' >/dev/null
+then
+ test_expect_success 'skipping merge-order test' :
+ test_done
+ exit
+fi
+
normal_adjacency_count=$(git-rev-list HEAD | check_adjacency | grep -c "\^" | tr -d ' ')
merge_order_adjacency_count=$(git-rev-list --merge-order HEAD | check_adjacency | grep -c "\^" | tr -d ' ')
test_expect_success '--merge-order produces as many or fewer discontinuities' '[ $merge_order_adjacency_count -le $normal_adjacency_count ]'
diff --git a/t/test-lib.sh b/t/test-lib.sh
index a97d259e26..7534a76208 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -195,7 +195,7 @@ test -d ../templates/blt || {
test=trash
rm -fr "$test"
mkdir "$test"
-cd "$test"
+cd "$test" || error "Cannot setup test environment"
"$GIT_EXEC_PATH/git" init-db --template=../../templates/blt/ 2>/dev/null ||
error "cannot run git init-db -- have you built things yet?"