Rewrite IO.ANSI tests to match new behavior