func TestErrorWithWindowsPathSeparator(t *testing.T) {
	err := errors.New("/foo/bar is bad")
	require.EqualError(t, errorWithWindowsPathSeparator(err), `\foo\bar is bad`)
	wrapped := errors.New("bad day")
	err = fmt.Errorf("/foo/bar is unhappy: %w", wrapped)
	wErr := errorWithWindowsPathSeparator(err)
	require.EqualError(t, wErr, `\foo\bar is unhappy: bad day`)
	require.Same(t, wrapped, errors.Unwrap(wErr))
}
TestErrorWithWindowsPathSeparator makes sure errors don't accidentally escape the windows path separator.
this is extracted so that maintainers can make sure it works without using windows.
package moreos
import (
	"bytes"
	"errors"
	"fmt"
	"os"
	"os/exec"
	"path/filepath"
	"runtime"
	"testing"
	"github.com/shirou/gopsutil/v3/process"
	"github.com/stretchr/testify/require"
)