Let\'s say I want to write a function that validates an email address with a regex. I write a little test to check my function and write the actual function. Make it pass.>
I don't think that you should write separate test for each case since all the cases are related to the same thing which is testing that the string is the correct email address. If you are using MbUnit or NUnit for running your tests then you can use the RowTest and Row attribute to pass in different values to the test. Another way is to store all the different email formats in an array and loop over the array and perform the assert.