mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-12-04 05:43:27 +01:00
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.
22 lines
424 B
Go
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())
|
|
}
|