2 # Before `make install' is performed this script should be runnable with
3 # `make test'. After `make install' it should work as `perl test.pl'
5 #########################
8 BEGIN { plan tests => 3 };
10 my ($srcdir) = ($0 =~ m!(.*/)!);
11 chdir("${srcdir}symbol-test") or die $!;
13 open ARGS, "../../makefile-pl-args" or die $!;
18 # Avoid inheriting values with Search/Xapian path in.
20 delete $ENV{MAKEFLAGS};
22 system($^X, "Makefile.PL", @args) == 0 or die $!;
23 system("make 2>&1") == 0 or die $!;
26 # For shared objects when built with uninstalled xapian-core (libtool):
27 "blib/arch/auto/SymbolTest/.libs",
28 # For shared objects when built with installed xapian-core (no libtool):
29 "blib/arch/auto/SymbolTest",
35 eval { SymbolTest::throw_from_libxapian() };
36 like( $@, qr/DatabaseOpeningError caught in SymbolTest/, 'Correct exception caught');
38 use Search::Xapian qw( :all );
40 eval { SymbolTest::throw_from_libxapian() };
41 like( $@, qr/DatabaseOpeningError caught in SymbolTest/, 'Correct exception caught');