Add functional tests for `select`