X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=blobdiff_plain;f=extra%2Flint%2Fvocabs%2Fvocabs-tests.factor;h=c34cea6ea3b439c34ce8c2f94521174857754e42;hp=61e5ffa29fb8d44e5c56a00c6f138312d0eef5d9;hb=0cb35fccbba1bf28ec91487fd06247a56feb0514;hpb=c0a790904791be6f356a0a5737fad17e8aeaeb6f diff --git a/extra/lint/vocabs/vocabs-tests.factor b/extra/lint/vocabs/vocabs-tests.factor index 61e5ffa29f..c34cea6ea3 100644 --- a/extra/lint/vocabs/vocabs-tests.factor +++ b/extra/lint/vocabs/vocabs-tests.factor @@ -41,6 +41,7 @@ CONSTANT: ignore-in-string-four "\"asdfasdf USE: asdfasdf\" \"asdfasff USING CONSTANT: ignore-string-with-quote "\"\\\"USE:\" : nop ( -- ) ;" CONSTANT: ignore-use-regex "R/ USE: ignore/ : nop ( -- ) ;" CONSTANT: ignore-using-regex "R/ USING: ignore ;/ : nop ( -- ) ;" +CONSTANT: ignore-char-backslash "CHAR: \\ USING: math.functions ;" CONSTANT: empty-using-statement "USING: ; nop ( -- ) ;" : ---- ( -- ) "-------------------------------------------------------------------------" print ; PRIVATE> @@ -68,6 +69,11 @@ PRIVATE> ---- +"It should ignore CHAR: \\: " print +{ { "math.functions" } } [ ignore-char-backslash find-unused-in-string ] unit-test + +---- + "It should ignore USE: and USING: that are in RegEx: " print { { } } [ ignore-use-regex find-unused-in-string ] unit-test { { } } [ ignore-using-regex find-unused-in-string ] unit-test