I don't think there is any "special" food that is going to help you remember material but there are types of food that will give you a few advantages.
First, stay away from heavily greasy or oily foods that my give you an upset stomach or sit heavy in the tummy. That will make you uncomfortable and comfort is important so you have less distractions.
Second, stay away from any food that is questionable when it comes to how fast it moves through you system. It's a comfort thing but also you don't want to have to use the restroom in the middle of a test which would affect your focus.
Third, this is what I go by and it hasn't steered me wrong. Carbohydrates. Your muscles and your brain run on glycogen. The carbohydrates produce the glycogen which replenishes and stores. This is why athletes "carb up" before competitions(although they usually do it the night before).
Bodybuilders do something called a "carb load", where they restrict their carbohydrates for 3 days and workout moderately to deplete their glycogen storage and then load up the carbs for 3 days, which flood the muscles with glycogen and make them look fuller. The reason I bring this up is that, if you have ever talked to a bodybuilder during the first 3 days, when they are loosing the glycogen, they say they are having a hard time focusing their thoughts. (they still eat the proper amount of calories the first three days, just not many carbs, instead protein and some good fats.)
So I make sure to eat carbs that morning or before or later depending on when the test is. **carbs are basically not meat, dairy or fat. **Sugar is also carbs but there are 2 types, complex and simple. Sugar are simple carbs and not the kind that you are looking for. You want bread, granola, cereal, pasta, brown rice... that type of stuff.
Also depending on how long the test is, I do like to have caffeine with during it. If it is less than an hour I have a mountain dew(yes I know it has a lot of sugar, i just don't care). If it is a long test like a mid-term or final I bring a Monster. (there have been some positive results with energy drinks and their ability to assist ADD students to focus better)
Unfortunately I usually have to use the restroom during though, so I try to find a good time to go that won't mess up my rhythm.
Finally, anything you do, do in moderation. You can and should eat, but don't eat any meal to where you feel "stuffed", you might get sleepy.
Hope this helps.