use strict;
use warnings;
-use Test::More tests => 18;
+use Test::More tests => 20;
BEGIN { use_ok('Zeal') };
note 'Working with t/ds/b.docset';
is $doc->name, 'building', 'document name is building';
is $doc->type, 'Word', 'document type is Word';
like $doc->fetch, qr/^Dummy/, 'document HTML starts with "Dummy"';
+is $doc->anchor, 'dummy_anchor', 'document anchor is dummy_anchor';
@results = sort {$a->name cmp $b->name} $ds->list;
is @results, 2, 'docset contains two documents';
note 'Working with all docsets in t/ds/';
my $zeal = Zeal->new('t/ds/');
+eval {
+ $zeal->query('family:term');
+ fail 'An exception was not thrown when searching for a nonexistent family';
+ 1
+} or like $@, qr/^No docsets/, 'An exception is thrown when searching for a nonexistent family';
+
my @sets = $zeal->sets;
is @sets, 3, '3 docsets loaded';
@results = $zeal->query('buil%');