Remove some uses of ~[] from test