Files
HackBrowserData/cmd/hack-browser-data/main_other_test.go
T
Roger 2e7ee3c69f test: tidy misplaced, stale, and redundant tests (#691)
Tests now sit beside the code they cover; ones a golden or another test already pins are gone, and core tests gain the assertions a real regression would trip.
2026-11-09 17:25:37 +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())
}