Add unit tests for the --list option.