Add the check for suffix of option in each line of help, to make sure no extra space in it

Signed-off-by: Zen Lin(Zhinan Lin) <linzhinan@huawei.com>
Upstream-commit: f63a29ddeee62c8e4fcb1cf8eaf84aff305380c0
Component: engine
This commit is contained in:
Zen Lin(Zhinan Lin)
2015-03-11 18:46:01 +08:00
parent e5672966b5
commit 8855da6111
@@ -130,6 +130,11 @@ func TestHelpTextVerify(t *testing.T) {
if strings.HasPrefix(line, " -") && strings.HasSuffix(line, ".") {
t.Fatalf("Help for %q should not end with a period: %s", cmd, line)
}
// Options should not end with a space
if strings.HasSuffix(line, " ") {
t.Fatalf("Help for %q should not end with a space: %s", cmd, line)
}
}
}