Merge branch 'ds/commit-graph-on-fetch'
[gitweb.git] / t / t0021-conversion.sh
index 6a213608cc10fc29691f8bf293b0a34ce1f93c5e..c954c709ad2f50dac563cf237f7d485a2d41b7aa 100755 (executable)
@@ -24,7 +24,7 @@ generate_random_characters () {
 }
 
 file_size () {
-       perl -e 'print -s $ARGV[0]' "$1"
+       test-tool path-utils file-size "$1"
 }
 
 filter_git () {
@@ -166,10 +166,10 @@ test_expect_success expanded_in_repo '
        rm -f expanded-keywords expanded-keywords-crlf &&
 
        git checkout -- expanded-keywords &&
-       test_cmp expanded-keywords expected-output &&
+       test_cmp expected-output expanded-keywords &&
 
        git checkout -- expanded-keywords-crlf &&
-       test_cmp expanded-keywords-crlf expected-output-crlf
+       test_cmp expected-output-crlf expanded-keywords-crlf
 '
 
 # The use of %f in a filter definition is expanded to the path to
@@ -390,6 +390,9 @@ test_expect_success PERL 'required process filter should filter data' '
                EOF
                test_cmp_exclude_clean expected.log debug.log &&
 
+               # Make sure that the file appears dirty, so checkout below has to
+               # run the configured filter.
+               touch test.r &&
                filter_git checkout --quiet --no-progress empty-branch &&
                cat >expected.log <<-EOF &&
                        START
@@ -583,7 +586,7 @@ test_expect_success PERL 'process filter should restart after unexpected write f
                git checkout --quiet --no-progress . 2>git-stderr.log &&
 
                grep "smudge write error at" git-stderr.log &&
-               grep "error: external filter" git-stderr.log &&
+               test_i18ngrep "error: external filter" git-stderr.log &&
 
                cat >expected.log <<-EOF &&
                        START