1#!/usr/bin/perl 2# cleanup.t 3# Copyright (c) 2006 Jonathan Rockway <jrockway@cpan.org> 4 5use Test::More tests => 8; 6use Directory::Scratch; 7use strict; 8use warnings; 9 10my $tmp = Directory::Scratch->new; 11ok($tmp, 'create $tmp'); 12ok($tmp->touch('foo'), 'touch foo'); 13ok($tmp->mkdir('bar'), 'mkdir bar'); 14ok($tmp->touch('bar/baz'), 'touch baz'); 15$tmp->cleanup; 16ok(!$tmp->exists('foo')); 17ok(!$tmp->exists('bar')); 18ok(!$tmp->exists('baz')); 19ok(!-e $tmp->base, 'no base'); 20 21