- is( File::Spec->canonpath( cwd() ), $new_dir, "changed to new directory" ); + is( File::Spec->abs2rel( cwd(), $new_dir), File::Spec->curdir, + "changed to new directory" + );