mccl/internal/manifest/argument_test.go

17 lines
360 B
Go
Raw Normal View History

package manifest
import (
"encoding/json"
"testing"
)
func TestArgument(t *testing.T) {
s := []byte("{\"rules\": [{ \"action\": \"allow\", \"os\": { \"name\": \"osx\" } }], \"value\":[\"-XstartOnFirstThread\"]}")
a := Argument{}
if err := json.Unmarshal(s, &a); err != nil {
t.Fatal(err)
}
ok, f := a.CheckRules()
t.Log(a, ok, f)
}