Merge branch 'ja/i18n-fix'
[gitweb.git] / t / t9802-git-p4-filetype.sh
index 66d3fc91a739a7f04bb73694a2f5d75034045d10..9978352d7828dbd63d44d172b91193a20291c4d1 100755 (executable)
@@ -223,12 +223,12 @@ build_gendouble() {
        import sys
        import struct
 
-       s = struct.pack(">LL18s",
+       s = struct.pack(b">LL18s",
                        0x00051607,  # AppleDouble
                        0x00020000,  # version 2
-                       ""           # pad to 26 bytes
+                       b""          # pad to 26 bytes
        )
-       sys.stdout.write(s)
+       getattr(sys.stdout, 'buffer', sys.stdout).write(s)
        EOF
 }
 
@@ -237,7 +237,7 @@ test_expect_success 'ignore apple' '
        build_gendouble &&
        (
                cd "$cli" &&
-               test-genrandom apple 1024 >double.png &&
+               test-tool genrandom apple 1024 >double.png &&
                "$PYTHON_PATH" "$TRASH_DIRECTORY/gendouble.py" >%double.png &&
                p4 add -t apple double.png &&
                p4 submit -d appledouble
@@ -310,7 +310,7 @@ test_expect_success SYMLINKS 'empty symlink target' '
                # p4 to sync here will make it generate errors.
                cd "$cli" &&
                p4 print -q //depot/empty-symlink#2 >out &&
-               test ! -s out
+               test_must_be_empty out
        ) &&
        test_when_finished cleanup_git &&