Add tests for msg.c