Add a test for port parsing and types

Partly addressing #442