tests: Add a test for realloc