Files
HackBrowserData/cmd/hack-browser-data/helpers_test.go
T
Roger 0ed920f846 docs: trim code comments to the why (#676)
Comments that restated names or narrated the code are gone, and multi-line ones are cut to a line of why.
Only comments change: each edited Go file has the same token stream as before. winapi and abe come later.
2026-11-02 00:03:03 +08:00

22 lines
424 B
Go

package main
import (
"testing"
"github.com/spf13/cobra"
"github.com/stretchr/testify/require"
)
// Windows reads USERPROFILE rather than HOME, so both point at the fixture.
func setHome(t *testing.T, home string) {
t.Helper()
t.Setenv("HOME", home)
t.Setenv("USERPROFILE", home)
}
func runCmd(t *testing.T, cmd *cobra.Command, args ...string) {
t.Helper()
cmd.SetArgs(args)
require.NoError(t, cmd.Execute())
}