Total Lines | 15 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package internal |
||
2 | |||
3 | import ( |
||
4 | "fmt" |
||
5 | "testing" |
||
6 | ) |
||
7 | |||
8 | |||
9 | // Test that parse args correctly returns the command and args |
||
10 | func TestParseArgsCorrectly(t *testing.T) { |
||
11 | progArgs := []string{"qdbg", "cmd", "arg1", "arg2"} |
||
12 | cmd, args := ParseArgs(progArgs) |
||
13 | fmt.Println(args) |
||
14 | if cmd != "cmd" { |
||
15 | t.Fatalf("Error in ParseArgs. Got command %s but expected `cmd`", cmd) |
||
16 | } |
||
18 |