diff mbox series

[v1,1/6] t0300: don't create unused file

Message ID 20230401212858.266508-2-rybak.a.v@gmail.com (mailing list archive)
State Superseded
Headers show
Series t: fix unused files, part 2 | expand

Commit Message

Andrei Rybak April 1, 2023, 9:28 p.m. UTC
Test 'credential config with partial URLs' in t0300-credentials.sh
contaisn three "git credential fill" invocations.  For two of the
invocations, the test asserts presence or absence of string "yep" in the
standard output.  For the third test it checks for an error message in
standard error.

Don't redirect standard output of "git credential" to file "stdout" in
t0300-credentials.sh to avoid creating an unnecessary file when only
standard error is checked.

Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>
---
 t/t0300-credentials.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Sunshine April 2, 2023, 1:30 a.m. UTC | #1
On Sat, Apr 1, 2023 at 5:34 PM Andrei Rybak <rybak.a.v@gmail.com> wrote:
> Test 'credential config with partial URLs' in t0300-credentials.sh
> contaisn three "git credential fill" invocations.  For two of the
> invocations, the test asserts presence or absence of string "yep" in the
> standard output.  For the third test it checks for an error message in
> standard error.

s/contaisn/contains/

> Don't redirect standard output of "git credential" to file "stdout" in
> t0300-credentials.sh to avoid creating an unnecessary file when only
> standard error is checked.
>
> Signed-off-by: Andrei Rybak <rybak.a.v@gmail.com>
diff mbox series

Patch

diff --git a/t/t0300-credentials.sh b/t/t0300-credentials.sh
index c66d91e82d..b8612ede95 100755
--- a/t/t0300-credentials.sh
+++ b/t/t0300-credentials.sh
@@ -808,7 +808,7 @@  test_expect_success 'credential config with partial URLs' '
 
 	git -c credential.$partial.helper=yep \
 		-c credential.with%0anewline.username=uh-oh \
-		credential fill <stdin >stdout 2>stderr &&
+		credential fill <stdin 2>stderr &&
 	test_i18ngrep "skipping credential lookup for key" stderr
 '