github.com/xyproto/orbiton/v2@v2.65.12-0.20240516144430-e10a419274ec/process_test.go (about)

     1  package main
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestParentIsMan(t *testing.T) {
     8  	// This test will only pass if run from the 'man' command, which is not typical.
     9  	isMan := parentIsMan()
    10  	if isMan {
    11  		t.Logf("Parent process is 'man'.")
    12  	} else {
    13  		t.Logf("Parent process is not 'man'.")
    14  	}
    15  }