test: Improve colon test comment

I use these patterns when early hacking, and it's good to have a test to
catch them all before I merge.
This commit is contained in:
James Shubin
2025-09-08 23:05:07 -04:00
parent 6fac46da7c
commit 2e858ff447
2 changed files with 3 additions and 2 deletions

View File

@@ -34,7 +34,8 @@ function simplify-gocase() {
function token-coloncheck() {
# add quotes to avoid matching three X's
if grep -Ei "[\/]+[\/]+[ ]*(T"'O''D'"O[^:]|F"'I''X''M'"E[^:]|X"'X'"X[^:])" "$1"; then
#if grep -Ei "[\/]+[\/]+[ ]*(T"'O''D'"O[^:]|F"'I''X''M'"E[^:]|X"'X'"X[^:])" "$1"; then
if grep -Ei "[\/]+[\/]+[\ 0-9a-zA-Z_@\*\?\'\(\)\{\}-]*(T"'O''D'"O[^:]|F"'I''X''M'"E[^:]|X"'X'"X[^:])" "$1"; then # not perfect
return 1 # tokens must end with a colon
fi
# tokens must be upper case