internal.TestParseArgsCorrectly   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 6
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 6
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 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
    }
17
}
18