From d5e21d41b87bb559fc4c72cdba887db325aabba1 Mon Sep 17 00:00:00 2001 From: Allen Madsen Date: Wed, 25 Mar 2015 19:59:40 -0400 Subject: [PATCH] Add test for successful Ulimit Parse. Signed-off-by: Allen Madsen --- ulimit/ulimit_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ulimit/ulimit_test.go b/ulimit/ulimit_test.go index 419b5e0..271ac25 100644 --- a/ulimit/ulimit_test.go +++ b/ulimit/ulimit_test.go @@ -2,6 +2,13 @@ package ulimit import "testing" +func TestParseValid(t *testing.T) { + u1 := &Ulimit{"nofile", 1024, 512} + if u2, _ := Parse("nofile=512:1024"); u1 == u2 { + t.Fatalf("expected %s, but got %s", u1.String(), u2.String()) + } +} + func TestParseInvalidLimitType(t *testing.T) { if _, err := Parse("notarealtype=1024:1024"); err == nil { t.Fatalf("expected error on invalid ulimit type")