浏览代码

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>
Zen Lin(Zhinan Lin) 10 年之前
父节点
当前提交
f63a29ddee
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      integration-cli/docker_cli_help_test.go

+ 5 - 0
integration-cli/docker_cli_help_test.go

@@ -130,6 +130,11 @@ func TestHelpTextVerify(t *testing.T) {
 				if strings.HasPrefix(line, "  -") && strings.HasSuffix(line, ".") {
 				if strings.HasPrefix(line, "  -") && strings.HasSuffix(line, ".") {
 					t.Fatalf("Help for %q should not end with a period: %s", cmd, 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)
+				}
 			}
 			}
 		}
 		}