There is quite a lot of duplicate code in rdata_test.c that can be refactored to facilitate adding further tests.