]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t1300: don't create unused files
authorAndrei Rybak <rybak.a.v@gmail.com>
Mon, 17 Apr 2023 19:10:41 +0000 (21:10 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 May 2023 15:52:48 +0000 (08:52 -0700)
Three tests in t1300-config.sh check that "git config --get" barfs when
syntax errors are present in the config file.  The tests redirect
standard output and standard error of "git config --get" to files,
"actual" and "error" correspondingly.  They assert presence of an error
message in file "error".  However, these tests don't use file "actual"
for assertions.

Don't redirect standard output of "git config --get" to file "actual" in
t1300-config.sh to avoid creating unnecessary files.

Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1300-config.sh

index d566729d74f53131c4333eeb88e74f24791c677d..8ac4531c1b17c7d4403306d91ff793ce4600f60e 100755 (executable)
@@ -1575,7 +1575,7 @@ test_expect_success 'barf on syntax error' '
        [section]
        key garbage
        EOF
-       test_must_fail git config --get section.key >actual 2>error &&
+       test_must_fail git config --get section.key 2>error &&
        test_i18ngrep " line 3 " error
 '
 
@@ -1585,7 +1585,7 @@ test_expect_success 'barf on incomplete section header' '
        [section
        key = value
        EOF
-       test_must_fail git config --get section.key >actual 2>error &&
+       test_must_fail git config --get section.key 2>error &&
        test_i18ngrep " line 2 " error
 '
 
@@ -1595,7 +1595,7 @@ test_expect_success 'barf on incomplete string' '
        [section]
        key = "value string
        EOF
-       test_must_fail git config --get section.key >actual 2>error &&
+       test_must_fail git config --get section.key 2>error &&
        test_i18ngrep " line 3 " error
 '