Git fork

t: adapt existing PERL prerequisites

A couple of our tests depend on the PERL prerequisite even though it
isn't needed. These tests fall into one of the following classes:

- The underlying logic used to be implemented in Perl but isn't
anymore. Here we can simply drop the dependency altogether.

- The test logic used to depend on Perl but doesn't anymore. Again, we
can simply drop the dependency.

- The test logic still relies on a Perl interpreter. These tests
should use the newly introduced PERL_TEST_HELPERS prerequisite.

Adapt test cases accordingly.

Note that in t1006 we have to introduce another new prerequisite
depending on whether or not the IPC::Open2 module is available. Funny
enough, when starting to use `test_lazy_prereq` to do so we also get a
conflict of variables with the "script" variable that contains the Perl
logic because `test_run_lazy_prereq_` also sets that variable. We thus
rename the variable in t1006 to "perl_script".

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Patrick Steinhardt and committed by
Junio C Hamano
64b3eee0 23e21a58

+19 -15
+5 -5
t/t0021-conversion.sh
··· 841 841 ) 842 842 ' 843 843 844 - test_expect_success PERL 'invalid process filter must fail (and not hang!)' ' 844 + test_expect_success 'invalid process filter must fail (and not hang!)' ' 845 845 test_config_global filter.protocol.process cat && 846 846 test_config_global filter.protocol.required true && 847 847 rm -rf repo && ··· 1111 1111 branch) opt='-f HEAD' ;; 1112 1112 esac 1113 1113 1114 - test_expect_success PERL,TTY "delayed checkout shows progress by default on tty ($mode checkout)" ' 1114 + test_expect_success TTY "delayed checkout shows progress by default on tty ($mode checkout)" ' 1115 1115 test_delayed_checkout_progress test_terminal git checkout $opt 1116 1116 ' 1117 1117 1118 - test_expect_success PERL "delayed checkout omits progress on non-tty ($mode checkout)" ' 1118 + test_expect_success "delayed checkout omits progress on non-tty ($mode checkout)" ' 1119 1119 test_delayed_checkout_progress ! git checkout $opt 1120 1120 ' 1121 1121 1122 - test_expect_success PERL,TTY "delayed checkout omits progress with --quiet ($mode checkout)" ' 1122 + test_expect_success TTY "delayed checkout omits progress with --quiet ($mode checkout)" ' 1123 1123 test_delayed_checkout_progress ! test_terminal git checkout --quiet $opt 1124 1124 ' 1125 1125 1126 - test_expect_success PERL,TTY "delayed checkout honors --[no]-progress ($mode checkout)" ' 1126 + test_expect_success TTY "delayed checkout honors --[no]-progress ($mode checkout)" ' 1127 1127 test_delayed_checkout_progress ! test_terminal git checkout --no-progress $opt && 1128 1128 test_delayed_checkout_progress test_terminal git checkout --quiet --progress $opt 1129 1129 '
+2 -2
t/t0090-cache-tree.sh
··· 128 128 test_cache_tree 129 129 ' 130 130 131 - test_expect_success PERL 'commit --interactive gives cache-tree on partial commit' ' 131 + test_expect_success 'commit --interactive gives cache-tree on partial commit' ' 132 132 test_when_finished "git reset --hard" && 133 133 cat <<-\EOT >foo.c && 134 134 int foo() ··· 162 162 test_cache_tree expected.status 163 163 ' 164 164 165 - test_expect_success PERL 'commit -p with shrinking cache-tree' ' 165 + test_expect_success 'commit -p with shrinking cache-tree' ' 166 166 mkdir -p deep/very-long-subdir && 167 167 echo content >deep/very-long-subdir/file && 168 168 git add deep &&
+9 -5
t/t1006-cat-file.sh
··· 1323 1323 grep "^fatal:.*flush is only for --buffer mode.*" err 1324 1324 ' 1325 1325 1326 - script=' 1326 + perl_script=' 1327 1327 use warnings; 1328 1328 use strict; 1329 1329 use IPC::Open2; ··· 1345 1345 1346 1346 expect="$hello_oid blob $hello_size" 1347 1347 1348 - test_expect_success PERL '--batch-check is unbuffered by default' ' 1349 - perl -e "$script" -- --batch-check $hello_oid "$expect" 1348 + test_lazy_prereq PERL_IPC_OPEN2 ' 1349 + perl -MIPC::Open2 -e "exit 0" 1350 1350 ' 1351 1351 1352 - test_expect_success PERL '--batch-command info is unbuffered by default' ' 1353 - perl -e "$script" -- --batch-command $hello_oid "$expect" "info " 1352 + test_expect_success PERL_IPC_OPEN2 '--batch-check is unbuffered by default' ' 1353 + perl -e "$perl_script" -- --batch-check $hello_oid "$expect" 1354 + ' 1355 + 1356 + test_expect_success PERL_IPC_OPEN2 '--batch-command info is unbuffered by default' ' 1357 + perl -e "$perl_script" -- --batch-command $hello_oid "$expect" "info " 1354 1358 ' 1355 1359 1356 1360 test_done
+3 -3
t/t7501-commit-basic-functionality.sh
··· 46 46 test_must_fail git commit -m foo -a file 47 47 ' 48 48 49 - test_expect_success PERL 'can use paths with --interactive' ' 49 + test_expect_success 'can use paths with --interactive' ' 50 50 echo bong-o-bong >file && 51 51 # 2: update, 1:st path, that is all, 7: quit 52 52 test_write_lines 2 1 "" 7 | ··· 345 345 grep Rubber.Duck output 346 346 ' 347 347 348 - test_expect_success PERL 'interactive add' ' 348 + test_expect_success 'interactive add' ' 349 349 echo 7 | test_must_fail git commit --interactive >out && 350 350 grep "What now" out 351 351 ' 352 352 353 - test_expect_success PERL "commit --interactive doesn't change index if editor aborts" ' 353 + test_expect_success "commit --interactive doesn't change index if editor aborts" ' 354 354 echo zoo >file && 355 355 test_must_fail git diff --exit-code >diff1 && 356 356 test_write_lines u "*" q |