diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-23 02:35:02 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-23 02:35:02 +0900 |
| commit | 7e524634452f12cf39af6c5dee9434ed24986a7d (patch) | |
| tree | bb6dca93b94e4ff4ced517bb12d9f4b590e830f7 /print_test.go | |
| parent | 89970f51970b320430852ed57dcfc9d6c841322e (diff) | |
fortify: integrate command handler
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'print_test.go')
| -rw-r--r-- | print_test.go | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/print_test.go b/print_test.go index 5d5e814b..9e837225 100644 --- a/print_test.go +++ b/print_test.go @@ -448,14 +448,8 @@ App for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - { - v := flagJSON - t.Cleanup(func() { flagJSON = v }) - flagJSON = tc.json - } - output := new(strings.Builder) - printShowInstance(output, testTime, tc.instance, tc.config, tc.short) + printShowInstance(output, testTime, tc.instance, tc.config, tc.short, tc.json) if got := output.String(); got != tc.want { t.Errorf("printShowInstance: got\n%s\nwant\n%s", got, tc.want) @@ -645,14 +639,8 @@ func Test_printPs(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - { - v := flagJSON - t.Cleanup(func() { flagJSON = v }) - flagJSON = tc.json - } - output := new(strings.Builder) - printPs(output, testTime, stubStore(tc.entries), tc.short) + printPs(output, testTime, stubStore(tc.entries), tc.short, tc.json) if got := output.String(); got != tc.want { t.Errorf("printPs: got\n%s\nwant\n%s", got, tc.want) |
