t1300: don't create unused files
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>
Andrei Rybak committed
Apr 17, 2023 at 21:10 UTC
a7cae2905b8c51c564d0307cf9e8f3e53c2769c5
1 file changed
+3
-3
t/t1300-config.sh
+3
-3
@@ -1575,7 +1575,7 @@ test_expect_success 'barf on syntax error' '
1575
[section]
1576
key garbage
1577
EOF
1578
- test_must_fail git config --get section.key >actual 2>error &&
1578
+ test_must_fail git config --get section.key 2>error &&
1579
test_i18ngrep " line 3 " error
1580
'
1581
@@ -1585,7 +1585,7 @@ test_expect_success 'barf on incomplete section header' '
1585
[section
1586
key = value
1587
EOF
1588
- test_must_fail git config --get section.key >actual 2>error &&
1588
+ test_must_fail git config --get section.key 2>error &&
1589
test_i18ngrep " line 2 " error
1590
'
1591
@@ -1595,7 +1595,7 @@ test_expect_success 'barf on incomplete string' '
1595
[section]
1596
key = "value string
1597
EOF
1598
- test_must_fail git config --get section.key >actual 2>error &&
1598
+ test_must_fail git config --get section.key 2>error &&
1599
test_i18ngrep " line 3 " error
1600
'
1601