Add unit tests for package 'format'