Also run gofmt on kittens subdir in CI
This commit is contained in:
parent
c73f5ab8a0
commit
f02245af79
3 changed files with 4 additions and 4 deletions
2
.github/workflows/ci.py
vendored
2
.github/workflows/ci.py
vendored
|
|
@ -193,7 +193,7 @@ def main() -> None:
|
|||
elif action == 'test':
|
||||
test_kitty()
|
||||
elif action == 'gofmt':
|
||||
q = subprocess.check_output('gofmt -s -l tools'.split()).decode()
|
||||
q = subprocess.check_output('gofmt -s -l tools kittens'.split()).decode()
|
||||
if q.strip():
|
||||
q = '\n'.join(filter(lambda x: not x.rstrip().endswith('_generated.go'), q.strip().splitlines())).strip()
|
||||
if q:
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ func IteratorOverGraphemes(text string) iter.Seq[string] {
|
|||
}
|
||||
}
|
||||
if start_pos < len(text) {
|
||||
yield(text[start_pos:len(text)])
|
||||
yield(text[start_pos:])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ type GraphemeBreakTest struct {
|
|||
|
||||
func TestSplitIntoGraphemes(t *testing.T) {
|
||||
var m = map[string][]string{
|
||||
" \u0308 ": []string{" \u0308", " "},
|
||||
"abc": []string{"a", "b", "c"},
|
||||
" \u0308 ": {" \u0308", " "},
|
||||
"abc": {"a", "b", "c"},
|
||||
}
|
||||
for text, expected := range m {
|
||||
if diff := cmp.Diff(expected, SplitIntoGraphemes(text)); diff != "" {
|
||||
|
|
|
|||
Loading…
Reference in a new issue