"Fossies" - the Fresh Open Source Software Archive

Member "eprints3.4-3.4.4/tests/52_mem_cycle.pl" (7 Aug 2022, 1488 Bytes) of package /linux/www/eprints3.4-3.4.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "52_mem_cycle.pl": 3.4-3.4.3_vs_3.4-3.4.4.

    1 #!/usr/bin/perl
    2 
    3 use Test::More tests => 3;
    4 
    5 BEGIN { use_ok( "EPrints" ); }
    6 BEGIN { use_ok( "EPrints::Test" ); }
    7 
    8 unless(eval "use Test::Memory::Cycle; 1")
    9 {
   10     BAIL_OUT "Install Test::Memory::Cycle";
   11 }
   12 
   13 my $repoid = EPrints::Test::get_test_id();
   14 
   15 my $eprints;
   16 my $repository;
   17 
   18 # we load twice to check that reloading a repository won't cause cycles to
   19 # appear
   20 for(0..1)
   21 {
   22     undef $eprints;
   23     undef $repository;
   24     $eprints = EPrints->new;
   25 
   26     $repository = $eprints->repository( $repoid );
   27 }
   28 
   29 # do a load_config() to check that doesn't cause issues
   30 $repository->load_config();
   31 
   32 memory_cycle_ok( $repository, "Reference cycles after load_config" );
   33 
   34 =head1 COPYRIGHT
   35 
   36 =for COPYRIGHT BEGIN
   37 
   38 Copyright 2022 University of Southampton.
   39 EPrints 3.4 is supplied by EPrints Services.
   40 
   41 http://www.eprints.org/eprints-3.4/
   42 
   43 =for COPYRIGHT END
   44 
   45 =for LICENSE BEGIN
   46 
   47 This file is part of EPrints 3.4 L<http://www.eprints.org/>.
   48 
   49 EPrints 3.4 and this file are released under the terms of the
   50 GNU Lesser General Public License version 3 as published by
   51 the Free Software Foundation unless otherwise stated.
   52 
   53 EPrints 3.4 is distributed in the hope that it will be useful,
   54 but WITHOUT ANY WARRANTY; without even the implied warranty of
   55 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   56 See the GNU Lesser General Public License for more details.
   57 
   58 You should have received a copy of the GNU Lesser General Public
   59 License along with EPrints 3.4.
   60 If not, see L<http://www.gnu.org/licenses/>.
   61 
   62 =for LICENSE END
   63