Created
March 17, 2011 05:28
-
-
Save seth/873884 to your computer and use it in GitHub Desktop.
Example of multi-generator list comprehension to generate a matrix of test cases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
term_special_chars_test_() -> | |
SpecialChars = ["!", "(", ")", "{", "}", "[", "]", | |
"^", "\"", "~", "*", "?", ":", "\\"], | |
Formats = ["foo~sbar", "~sb", "a~s", "a~sb"], | |
Terms = [ ?i2b(io_lib:format(F, ["\\" ++ C])) || | |
F <- Formats, C <- SpecialChars ], | |
[ ?_assertEqual(T, hd(lucene:parse(T))) || T <- Terms ]. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment