test: use here document for expected commands

It is more readable rather than "..." + "..." + ... becuse it is the
same format as the expected data.