From 4c6ed2d8eae63c3c5123a5204bea831be2621e4e Mon Sep 17 00:00:00 2001 From: Mostafa Moradian Date: Sun, 21 Apr 2024 19:09:43 +0200 Subject: [PATCH] Execute prints to stderr --- cmd/root_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/root_test.go b/cmd/root_test.go index 691b8da5..4f213a96 100644 --- a/cmd/root_test.go +++ b/cmd/root_test.go @@ -38,8 +38,8 @@ func Test_rootCmd(t *testing.T) { } func Test_Execute(t *testing.T) { - stdout := capturer.CaptureStdout(func() { + stderr := capturer.CaptureOutput(func() { Execute() }) - assert.Equal(t, rootHelp, stdout, "Execute should print the correct output") + assert.Equal(t, rootHelp, stderr, "Execute should print the correct output to stderr") }