blob: 62ca6068a9fa3d1c86f79d315c20903c61d0dd69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package qemu
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestEditCmd(t *testing.T) {
vm := new(MachineVM)
vm.CmdLine = []string{"command", "-flag", "value"}
vm.editCmdLine("-flag", "newvalue")
vm.editCmdLine("-anotherflag", "anothervalue")
require.Equal(t, vm.CmdLine, []string{"command", "-flag", "newvalue", "-anotherflag", "anothervalue"})
}
|