package main import ( "testing" "github.com/stretchr/testify/assert" ) func TestParseOpts(t *testing.T) { args := []string{"od.exe", "-x", "main.go"} opts := ParseOpts(args) assert.Equal(t, opts.Hex, true, "-x didn't work") // now we can test as much as we want args = []string{"cat.exe", "-o", "main.go"} opts = ParseOpts(args) assert.Equal(t, opts.Octal, true, "-o didn't work") }