From 8855da61118b1ea9e641b36da15b6253f0342e72 Mon Sep 17 00:00:00 2001 From: "Zen Lin(Zhinan Lin)" Date: Wed, 11 Mar 2015 18:46:01 +0800 Subject: [PATCH] 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) Upstream-commit: f63a29ddeee62c8e4fcb1cf8eaf84aff305380c0 Component: engine --- components/engine/integration-cli/docker_cli_help_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/engine/integration-cli/docker_cli_help_test.go b/components/engine/integration-cli/docker_cli_help_test.go index 1c83204244..c48fbafc43 100644 --- a/components/engine/integration-cli/docker_cli_help_test.go +++ b/components/engine/integration-cli/docker_cli_help_test.go @@ -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) + } } }