Browse code

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) authored on 2015/03/11 19:46:01
Showing 1 changed files
... ...
@@ -130,6 +130,11 @@ func TestHelpTextVerify(t *testing.T) {
130 130
 				if strings.HasPrefix(line, "  -") && strings.HasSuffix(line, ".") {
131 131
 					t.Fatalf("Help for %q should not end with a period: %s", cmd, line)
132 132
 				}
133
+				
134
+				// Options should not end with a space
135
+				if strings.HasSuffix(line, " ") {
136
+					t.Fatalf("Help for %q should not end with a space: %s", cmd, line)
137
+				}
133 138
 			}
134 139
 		}
135 140