|
|
|
|
@ -11,6 +11,8 @@ func TestStepTypeBootCommand_gather(t *testing.T) {
|
|
|
|
|
{"02", "82", "03", "83"},
|
|
|
|
|
{"wait5", "wait1", "wait10"},
|
|
|
|
|
{"wait5", "02", "82", "03", "83", "wait1", "wait10"},
|
|
|
|
|
{"wait1"},
|
|
|
|
|
{"01"},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
expected := [][]string{
|
|
|
|
|
@ -18,12 +20,14 @@ func TestStepTypeBootCommand_gather(t *testing.T) {
|
|
|
|
|
{"02 82 03 83"},
|
|
|
|
|
{"wait5", "wait1", "wait10"},
|
|
|
|
|
{"wait5", "02 82 03 83", "wait1", "wait10"},
|
|
|
|
|
{"wait1"},
|
|
|
|
|
{"01"},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for i, data := range input {
|
|
|
|
|
if !reflect.DeepEqual(gathercodes(data), expected[i]) {
|
|
|
|
|
t.Fatalf("%#v did not equal expected %#v", data, expected[i])
|
|
|
|
|
gathered := gathercodes(data)
|
|
|
|
|
if !reflect.DeepEqual(gathered, expected[i]) {
|
|
|
|
|
t.Fatalf("%#v did not equal expected %#v", gathered, expected[i])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|