]> asedeno.scripts.mit.edu Git - git.git/blobdiff - t/t0021-conversion.sh
Merge branch 'jh/notes' (early part)
[git.git] / t / t0021-conversion.sh
index a839f4e0744cd9344a3d71a48fe2224a99750729..6cb8d60ea2649495c0e3c8bbb8b7cc75c36799b7 100755 (executable)
@@ -4,8 +4,11 @@ test_description='blob conversion via gitattributes'
 
 . ./test-lib.sh
 
-cat <<\EOF >rot13.sh
-tr '[a-zA-Z]' '[n-za-mN-ZA-M]'
+cat <<EOF >rot13.sh
+#!$SHELL_PATH
+tr \
+  'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \
+  'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
 EOF
 chmod +x rot13.sh
 
@@ -42,7 +45,12 @@ test_expect_success check '
        git diff --raw --exit-code :test :test.i &&
        id=$(git rev-parse --verify :test) &&
        embedded=$(sed -ne "$script" test.i) &&
-       test "z$id" = "z$embedded"
+       test "z$id" = "z$embedded" &&
+
+       git cat-file blob :test.t > test.r &&
+
+       ./rot13.sh < test.o > test.t &&
+       cmp test.r test.t
 '
 
 # If an expanded ident ever gets into the repository, we want to make sure that