File: 03-options.t

package info (click to toggle)
libfile-finder-perl 0.53-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 148 kB
  • sloc: perl: 985; sh: 3; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 488 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! perl
use Test::More 'no_plan';

BEGIN { use_ok('File::Finder') }

isa_ok(my $f = File::Finder->new, "File::Finder");

## also tests cloning
{
  isa_ok(my $f1 = $f->depth, "File::Finder");
  ok($f1->as_options->{bydepth}, "setting bydepth");
  ok(!$f1->as_options->{follow}, "setting bydepth, follow not set");
}

{
  isa_ok(my $f1 = $f->follow, "File::Finder");
  ok($f1->as_options->{follow}, "setting follow");
  ok(!$f1->as_options->{bydepth}, "setting follow, bydepth not set");
}