Skip to content

Commit 939b203

Browse files
authored
Merge pull request #639 from jas4711/test-username-regexp
Accept '-' in usernames for ls self-test
2 parents ab738a1 + 935fe8e commit 939b203

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ls_formatting_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func runLsTestHelper(t *testing.T, result, expectedType, path string) {
135135

136136
// username / uid (len 8, number or string)
137137
const (
138-
name = "(?:[a-z_][a-z0-9_]*)"
138+
name = "(?:[A-Za-z_][-A-Z.a-z0-9_]*)"
139139
)
140140
if ok, err := regexp.MatchString("^(?:"+number+"|"+name+")+$", user); !ok {
141141
if err != nil {

0 commit comments

Comments
 (0)