3 test_description
='git shell tests'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success
'shell allows upload-pack' '
10 git upload-pack . <input >expect &&
11 git shell -c "git-upload-pack $SQ.$SQ" <input >actual &&
12 test_cmp expect actual
15 test_expect_success
'shell forbids other commands' '
16 test_must_fail git shell -c "git config foo.bar baz"
19 test_expect_success
'shell forbids interactive use by default' '
20 test_must_fail git shell
23 test_expect_success
'shell allows interactive command' '
24 mkdir git-shell-commands &&
25 write_script git-shell-commands/ping <<-\EOF &&
29 echo ping | git shell >actual &&
30 test_cmp expect actual
33 test_expect_success
'shell complains of overlong commands' '
34 perl -e "print \"a\" x 2**12 for (0..2**19)" |
35 test_must_fail git shell 2>err &&