Files
HackBrowserData/cmd/hack-browser-data/main_others_test.go
T
Roger 3e9150249c refactor: rename core types and spell out every name (#677)
Def, Request, DirID, and Source said too little, and short variables and doc comments that skip their name hid intent.
varnamelen and staticcheck ST1020-22 now keep both from coming back.
2026-11-02 11:06:05 +08:00

21 lines
433 B
Go

//go:build !windows
package main
import (
"os"
"syscall"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func assertEndedByInterrupt(t *testing.T, state *os.ProcessState) {
t.Helper()
status, ok := state.Sys().(syscall.WaitStatus)
require.True(t, ok)
assert.True(t, status.Signaled(), "ended by the signal, not by an exit code")
assert.Equal(t, syscall.SIGINT, status.Signal())
}