4 |
|
|
5 |
my $debug = shift @ARGV; |
my $debug = shift @ARGV; |
6 |
|
|
7 |
use Test::More tests => 5; |
use Test::More tests => 8; |
8 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
9 |
use Cwd qw/abs_path/; |
use Cwd qw/abs_path/; |
10 |
|
|
18 |
ok( EPrints->id( 42 ), 'id' ); |
ok( EPrints->id( 42 ), 'id' ); |
19 |
ok( EPrints->lookup( 'title' ), 'title' ); |
ok( EPrints->lookup( 'title' ), 'title' ); |
20 |
|
|
21 |
is_deeply( [ EPrints::slogovi( 'otorinolaringolog je duga riječ' ) ], |
ok( my $slogovi = EPrints->slogovi( 'otorinolaringolog je duga riječ' ), 'slogovi' ); |
|
[ qw/0o 1to 2ri 3no 4la 5ri 6ngo 7lo 8g 0je 0du 1ga 0ri 1je 2č/ ], |
|
|
'slogovi' ); |
|
22 |
|
|
23 |
|
diag "slogovi: $slogovi" if $debug; |
24 |
|
|
25 |
|
ok( my ($type,$uri) = EPrints->fulltext, 'fulltext' ); |
26 |
|
|
27 |
|
cmp_ok( $type, 'eq', 'pdf', 'fulltext type' ); |
28 |
|
like( $uri, qr!^http://!, 'fulltext uri' ); |
29 |
|
|
30 |
|
diag "type: $type uri: $uri" if $debug; |