mirror of
https://github.com/git/git.git
synced 2024-11-16 06:03:44 +01:00
ca8d148daf
There are quite a lot places where an output file is expected to be empty, and we fail the test when it is not. The output from running the test script with -i -v can be helped if we showed the unexpected contents at that point. We could of course do >expected.empty && test_cmp expected.empty actual but this is commmon enough to be done with a dedicated helper. Signed-off-by: Junio C Hamano <gitster@pobox.com>
36 lines
636 B
Bash
Executable file
36 lines
636 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='basic clone options'
|
|
. ./test-lib.sh
|
|
|
|
test_expect_success 'setup' '
|
|
|
|
mkdir parent &&
|
|
(cd parent && git init &&
|
|
echo one >file && git add file &&
|
|
git commit -m one)
|
|
|
|
'
|
|
|
|
test_expect_success 'clone -o' '
|
|
|
|
git clone -o foo parent clone-o &&
|
|
(cd clone-o && git rev-parse --verify refs/remotes/foo/master)
|
|
|
|
'
|
|
|
|
test_expect_success 'redirected clone' '
|
|
|
|
git clone "file://$(pwd)/parent" clone-redirected >out 2>err &&
|
|
test_must_be_empty err
|
|
|
|
'
|
|
test_expect_success 'redirected clone -v' '
|
|
|
|
git clone --progress "file://$(pwd)/parent" clone-redirected-progress \
|
|
>out 2>err &&
|
|
test -s err
|
|
|
|
'
|
|
|
|
test_done
|