1
0
Fork 0
mccl/internal/manifest/argument_test.go

17 lines
360 B
Go
Executable File

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)
}