summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Pete Wyckoff <pw@padd.com>2011-11-05 13:36:07 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-11-05 23:17:52 -0700
commit9f7ef0eaf2e54609128add5e8f9b506bdbb81dff (patch)
treef6dcf6261f2f6efea2d7ecaa0bb3ecf8e79560e2 /t
parentgit-p4: stop ignoring apple filetype (diff)
downloadtgif-9f7ef0eaf2e54609128add5e8f9b506bdbb81dff.tar.xz
git-p4: ignore apple filetype
Revert 97a21ca (git-p4: stop ignoring apple filetype, 2011-10-16) and add a test case. Reported-by: Michael Wookey <michaelwookey@gmail.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t9802-git-p4-filetype.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/t/t9802-git-p4-filetype.sh b/t/t9802-git-p4-filetype.sh
index 3b358ef8d8..992bb8cf0b 100755
--- a/t/t9802-git-p4-filetype.sh
+++ b/t/t9802-git-p4-filetype.sh
@@ -101,6 +101,37 @@ test_expect_success 'keyword file test' '
)
'
+build_gendouble() {
+ cat >gendouble.py <<-\EOF
+ import sys
+ import struct
+ import array
+
+ s = array.array("c", '\0' * 26)
+ struct.pack_into(">L", s, 0, 0x00051607) # AppleDouble
+ struct.pack_into(">L", s, 4, 0x00020000) # version 2
+ s.tofile(sys.stdout)
+ EOF
+}
+
+test_expect_success 'ignore apple' '
+ test_when_finished rm -f gendouble.py &&
+ build_gendouble &&
+ (
+ cd "$cli" &&
+ test-genrandom apple 1024 >double.png &&
+ "$PYTHON_PATH" "$TRASH_DIRECTORY/gendouble.py" >%double.png &&
+ p4 add -t apple double.png &&
+ p4 submit -d appledouble
+ ) &&
+ test_when_finished cleanup_git &&
+ "$GITP4" clone --dest="$git" //depot@all &&
+ (
+ cd "$git" &&
+ test ! -f double.png
+ )
+'
+
test_expect_success 'kill p4d' '
kill_p4d
'