Add unit tests for `split_port`