mirror of
https://github.com/gwoo/goforever.git
synced 2025-09-26 19:41:10 +08:00
25 lines
427 B
Go
25 lines
427 B
Go
// goforever - processes management
|
|
// Copyright (c) 2013 Garrett Woodworth (https://github.com/gwoo).
|
|
|
|
package main
|
|
|
|
import (
|
|
//"fmt"
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func Test_main(t *testing.T) {
|
|
if daemon.Name != "goforever" {
|
|
t.Error("Daemon name is not goforever")
|
|
}
|
|
os.Args = []string{"./goforever", "-d", "foo"}
|
|
dize := true
|
|
d = &dize
|
|
main()
|
|
if daemon.Args[0] != "foo" {
|
|
t.Error("First arg not foo")
|
|
}
|
|
daemon.stop()
|
|
}
|