3 test_description
='git shell tests'
6 test_expect_success
'shell allows upload-pack' '
8 git upload-pack . <input >expect &&
9 git shell -c "git-upload-pack $SQ.$SQ" <input >actual &&
10 test_cmp expect actual
13 test_expect_success
'shell forbids other commands' '
14 test_must_fail git shell -c "git config foo.bar baz"
17 test_expect_success
'shell forbids interactive use by default' '
18 test_must_fail git shell
21 test_expect_success
'shell allows interactive command' '
22 mkdir git-shell-commands &&
23 write_script git-shell-commands/ping <<-\EOF &&
27 echo ping | git shell >actual &&
28 test_cmp expect actual
31 test_expect_success
'shell complains of overlong commands' '
32 perl -e "print \"a\" x 2**12 for (0..2**19)" |
33 test_must_fail git shell 2>err &&