From 3ce89ce0c949a93ebdb92e44bcc65f3bff4dbdac Mon Sep 17 00:00:00 2001 From: Shirou WAKAYAMA Date: Fri, 6 Mar 2015 12:07:28 +0900 Subject: [PATCH] process: fix linux testing. --- process/process_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/process/process_test.go b/process/process_test.go index 9d70a41..3b0528f 100644 --- a/process/process_test.go +++ b/process/process_test.go @@ -121,7 +121,7 @@ func Test_Process_Status(t *testing.T) { if err != nil { t.Errorf("geting ppid error %v", err) } - if v != "S+" { + if !strings.HasPrefix(v, "S") && v != "running"{ t.Errorf("could not get state %v", v) } } @@ -133,8 +133,8 @@ func Test_Process_Terminal(t *testing.T) { if err != nil { t.Errorf("geting terminal error %v", err) } - if v != "S+" { - t.Errorf("could not get state %v", v) + if v == "" { + t.Errorf("could not get terminal %v", v) } } @@ -169,7 +169,7 @@ func Test_Process_Nice(t *testing.T) { if err != nil { t.Errorf("geting nice error %v", err) } - if n != 0 { + if n != 0 && n != 20{ t.Errorf("invalid nice: %d", n) } } -- GitLab