jorge-juan.garcia-gar...@ensimag.imag.fr writes:

> diff --git a/t/t7508-status.sh b/t/t7508-status.sh
> index e2ffdac..3c0818b 100755
> --- a/t/t7508-status.sh
> +++ b/t/t7508-status.sh
> @@ -1335,4 +1335,39 @@ test_expect_failure '.git/config ignore=all suppresses 
> submodule summary' '
>       git config -f .gitmodules  --remove-section submodule.subname
>  '
>  
> +test_expect_success 'Setup of test environment' '
> +     git config status.showUntrackedFiles no
> +'
> +
> +test_expect_success '"status.short=true" same as "-s"' '
> +     git -c status.short=true status >actual &&
> +     git status -s >expected_short &&
> +     test_cmp expected_short actual
> +'
> +
> +test_expect_success '"status.short=true" different from "--no-short"' '
> +     git status --no-short >expected_noshort &&
> +     test_must_fail test_cmp expected_noshort actual
> +'

I am not sure if "must be different, and I do not care what kind of
difference we get" is a good test.

> +test_expect_success '"status.short=true" weaker than "--no-short"' '
> +     git -c status.short=true status --no-short >actual &&
> +     test_cmp expected_noshort actual
> +'
> +
> +test_expect_success '"status.short=false" same as "--no-short"' '
> +     git -c status.short=false status >actual &&
> +     git status -s >expected_short &&
> +     test_cmp expected_noshort actual
> +'

I think the second line in this test is unwanted.

> +
> +test_expect_success '"status.short=false" weaker than "-s"' '
> +     git -c status.short=false status -s >actual &&
> +     test_cmp expected_short actual
> +'
> +
> +test_expect_success 'Restore default test environment' '
> +     git config --unset status.showUntrackedFiles
> +'
> +
>  test_done

I'll queue this patch after tweaking the test part like this.

Thanks.

diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index e2ffdac..33cadd0 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -1335,4 +1335,34 @@ test_expect_failure '.git/config ignore=all suppresses 
submodule summary' '
        git config -f .gitmodules  --remove-section submodule.subname
 '
 
+test_expect_success 'setup of test environment' '
+       git config status.showUntrackedFiles no &&
+       git status -s >expected_short &&
+       git status --no-short >expected_noshort
+'
+
+test_expect_success '"status.short=true" same as "-s"' '
+       git -c status.short=true status >actual &&
+       test_cmp expected_short actual
+'
+
+test_expect_success '"status.short=true" weaker than "--no-short"' '
+       git -c status.short=true status --no-short >actual &&
+       test_cmp expected_noshort actual
+'
+
+test_expect_success '"status.short=false" same as "--no-short"' '
+       git -c status.short=false status >actual &&
+       test_cmp expected_noshort actual
+'
+
+test_expect_success '"status.short=false" weaker than "-s"' '
+       git -c status.short=false status -s >actual &&
+       test_cmp expected_short actual
+'
+
+test_expect_success 'Restore default test environment' '
+       git config --unset status.showUntrackedFiles
+'
+
 test_done
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to