diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-29 02:33:10 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-29 06:11:47 +0900 |
| commit | 46cd3a28c83e93b5d66c52d06a8366c11910d5c0 (patch) | |
| tree | 6e25c5078b5cd9de78b7a6c9b253f1132358812b /system/output_test.go | |
| parent | ad1bc6794f0053c3e63eab408a0d530d53e8b51c (diff) | |
container: remove global msg
This frees all container instances of side effects.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'system/output_test.go')
| -rw-r--r-- | system/output_test.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/system/output_test.go b/system/output_test.go index 80abcf8d..b144d79c 100644 --- a/system/output_test.go +++ b/system/output_test.go @@ -9,7 +9,6 @@ import ( "testing" "hakurei.app/container" - "hakurei.app/internal/hlog" ) func TestOpError(t *testing.T) { @@ -87,33 +86,6 @@ func TestOpError(t *testing.T) { }) } -func TestSetOutput(t *testing.T) { - oldmsg := msg - t.Cleanup(func() { msg = oldmsg }) - msg = nil - - t.Run("nil", func(t *testing.T) { - SetOutput(nil) - if _, ok := msg.(*container.DefaultMsg); !ok { - t.Errorf("SetOutput: %#v", msg) - } - }) - - t.Run("hlog", func(t *testing.T) { - SetOutput(hlog.Output{}) - if _, ok := msg.(hlog.Output); !ok { - t.Errorf("SetOutput: %#v", msg) - } - }) - - t.Run("reset", func(t *testing.T) { - SetOutput(nil) - if _, ok := msg.(*container.DefaultMsg); !ok { - t.Errorf("SetOutput: %#v", msg) - } - }) -} - func TestPrintJoinedError(t *testing.T) { testCases := []struct { name string |
