Skip to content

Commit 558a816

Browse files
committed
tests for pidgrep. may need to be altered for linux
1 parent fbcdbe7 commit 558a816

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

pidgrep_test.go

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package l0la
2+
3+
import (
4+
"os"
5+
"testing"
6+
)
7+
8+
func TestPidGrepActive(t *testing.T) {
9+
pg := PidgrepActive(os.Getpid())
10+
if pg == false {
11+
t.Errorf("curren pid can't be inactive")
12+
}
13+
}
14+
15+
func TestPidGrepStatus(t *testing.T) {
16+
ps := Pidgrepstatus(os.Getpid())
17+
if ps != "[ACTIVE]" {
18+
t.Errorf("current pid has to be active")
19+
}
20+
}

0 commit comments

Comments
 (0)