Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t9850-shell.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t9850-shell.sh` 38 lines ยท 869 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='git shell tests' 4 5 . ./test-lib.sh 6 7 test_expect_success 'shell allows upload-pack' ' 8 printf 0000 >input && 9 git upload-pack . expect && 10 git shell -c "git-upload-pack $SQ.$SQ" actual && 11 test_cmp expect actual 12 ' 13 14 test_expect_success 'shell forbids other commands' ' 15 test_must_fail git shell -c "git config foo.bar baz" 16 ' 17 18 test_expect_success 'shell forbids interactive use by default' ' 19 test_must_fail git shell 20 ' 21 22 test_expect_success 'shell allows interactive command' ' 23 mkdir git-shell-commands && 24 write_script git-shell-commands/ping <<-\EOF && 25 echo pong 26 EOF 27 echo pong >expect && 28 echo ping | git shell >actual && 29 test_cmp expect actual 30 ' 31 32 test_expect_success 'shell complains of overlong commands' ' 33 test-tool genzeros | tr "\000" "a" | 34 test_must_fail git shell 2>err && 35 test_grep "too long" err 36 ' 37 38 test_done