提交 f1f50c59 编写于 作者: J Jingwen Owen Ou

Fix flaky test since config param is a map and order may not be preserved

上级 1c1f48b1
......@@ -37,9 +37,9 @@ func TestNewArgs(t *testing.T) {
assert.T(t, args.Noop)
assert.Equal(t, "version", args.Command)
args = NewArgs([]string{"-c", "foo=bar", "--git-dir=path", "--bare", "-c", "a=b"})
assert.Equal(t, 7, len(args.GlobalFlags))
assert.Equal(t, "-c foo=bar -c a=b --bare --git-dir path", strings.Join(args.GlobalFlags, " "))
args = NewArgs([]string{"-c", "foo=bar", "--git-dir=path", "--bare"})
assert.Equal(t, 5, len(args.GlobalFlags))
assert.Equal(t, "-c foo=bar --bare --git-dir path", strings.Join(args.GlobalFlags, " "))
}
func TestArgs_Words(t *testing.T) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册