veyron/lib/modules/core: expand the set of core modules.
Expand the set of core modules provided, cleanup various bugs
along the way.
Change-Id: I7f4966b91549a4edca049e908d6945bd03ef8172
diff --git a/lib/modules/modules_internal_test.go b/lib/modules/modules_internal_test.go
index 349869b..920538d 100644
--- a/lib/modules/modules_internal_test.go
+++ b/lib/modules/modules_internal_test.go
@@ -34,22 +34,24 @@
sh.AddSubprocess("echonotregistered", "[args]*")
sh.AddSubprocess("echos", "[args]*")
sh.AddFunction("echof", Echo, "[args]*")
-
assertNumHandles(t, sh, 0)
+
_, _ = sh.Start("echonotregistered") // won't start.
hs, _ := sh.Start("echos", "a")
hf, _ := sh.Start("echof", "b")
-
assertNumHandles(t, sh, 2)
+
for i, h := range []Handle{hs, hf} {
if got := h.Shutdown(nil); got != nil {
t.Errorf("%d: got %q, want %q", i, got, nil)
}
}
assertNumHandles(t, sh, 0)
+
hs, _ = sh.Start("echos", "a", "b")
hf, _ = sh.Start("echof", "c")
assertNumHandles(t, sh, 2)
+
sh.Cleanup(nil)
assertNumHandles(t, sh, 0)
}