]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/lint/vocabs/vocabs-tests.factor
Update String Regex
[factor.git] / extra / lint / vocabs / vocabs-tests.factor
index 61e5ffa29fb8d44e5c56a00c6f138312d0eef5d9..c34cea6ea3b439c34ce8c2f94521174857754e42 100644 (file)
@@ -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