Code

Merge branch 'tr/maint-no-index-fixes'
[git.git] / t / t4030-diff-textconv.sh
index 3945731e9a92eccffa6fcea4164da3bcbf991b3d..2f27a0ba9ec002b1a6e4d3bd0ed1dc7484d4d14e 100755 (executable)
@@ -21,7 +21,7 @@ EOF
 
 cat >hexdump <<'EOF'
 #!/bin/sh
-perl -e '$/ = undef; $_ = <>; s/./ord($&)/ge; print $_' "$1"
+perl -e '$/ = undef; $_ = <>; s/./ord($&)/ge; print $_' "$1"
 EOF
 chmod +x hexdump
 
@@ -29,7 +29,7 @@ test_expect_success 'setup binary file with history' '
        printf "\\0\\n" >file &&
        git add file &&
        git commit -m one &&
-       printf "\\1\\n" >>file &&
+       printf "\\01\\n" >>file &&
        git add file &&
        git commit -m two
 '
@@ -76,6 +76,14 @@ test_expect_success 'format-patch produces binary' '
        test_cmp expect.binary actual
 '
 
+test_expect_success 'status -v produces text' '
+       git reset --soft HEAD^ &&
+       git status -v >diff &&
+       find_diff <diff >actual &&
+       test_cmp expect.text actual &&
+       git reset --soft HEAD@{1}
+'
+
 cat >expect.stat <<'EOF'
  file |  Bin 2 -> 4 bytes
  1 files changed, 0 insertions(+), 0 deletions(-)
@@ -105,7 +113,7 @@ index ad8b3d2..67be421
 EOF
 # make a symlink the hard way that works on symlink-challenged file systems
 test_expect_success 'textconv does not act on symlinks' '
-       echo -n frotz > file &&
+       printf frotz > file &&
        git add file &&
        git ls-files -s | sed -e s/100644/120000/ |
                git update-index --index-info &&