If you don't have any Pokemon you can use the comand trainerbattle without problems. But when you enter the battle a Pokemon with a "?" sprite will appear in your team.
I saw in a hack today a script setvar that he was walking there appeared a NIDORAN and PIDGEY in that he battled without having the initial pokemon having the battle between Nidoran and Pidgey.