Pakistan had to restrict Sri Lanka's chase to 147 to advance from the Super Eights at New Zealand's expense.