If a shaman is too far away from other Orcs or Goblins he won't be able to absorb enough Waaagh power to cast spells. Shamans who are more than 12" away from any Orc or Goblin units are too far away to draw upon the Waaagh. In order to count an Orc unit must contain at least ten Orcs and a Goblin unit must contain at least twenty Goblins. Smaller units do not count, and neither do fleeing units.
A shaman who is more than 12" from any suitable Orc or Goblin units can't cast spells but he can still dispel enemy magic as normal. The blessed relief of getting away from the Orc boyz means that he doesn't have to control Waaagh power either and so doesn't run the risk of the dreaded 'Eadbang. No Waaagh test is therefore necessary.