17 lines
360 B
Go
17 lines
360 B
Go
|
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)
|
||
|
}
|