"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "t/1252_save_djvu_with_old_metadata.t" between
gscan2pdf-2.13.1.tar.xz and gscan2pdf-2.13.2.tar.xz

About: gscan2pdf is a GUI to produce PDFs from scanned documents (using Perl).

1252_save_djvu_with_old_metadata.t  (gscan2pdf-2.13.1.tar.xz):1252_save_djvu_with_old_metadata.t  (gscan2pdf-2.13.2.tar.xz)
use warnings; use warnings;
use strict; use strict;
use Date::Calc qw(Date_to_Time); use Date::Calc qw(Date_to_Time);
use File::stat; use File::stat;
use Glib qw(TRUE FALSE); # To get TRUE and FALSE use Glib qw(TRUE FALSE); # To get TRUE and FALSE
use IPC::Cmd qw(can_run); use IPC::Cmd qw(can_run);
use IPC::System::Simple qw(system capture); use IPC::System::Simple qw(system capture);
use Test::More tests => 2; use Test::More tests => 2;
BEGIN { BEGIN {
use Gscan2pdf::Document; use Gscan2pdf::Document;
use Gtk3 -init; # Could just call init separately use Gtk3 -init; # Could just call init separately
} }
######################### #########################
SKIP: { SKIP: {
skip 'DjVuLibre not installed', 2 unless can_run('cjb2'); skip 'DjVuLibre not installed', 2 unless can_run('cjb2');
Gscan2pdf::Translation::set_domain('gscan2pdf'); Gscan2pdf::Translation::set_domain('gscan2pdf');
use Log::Log4perl qw(:easy); use Log::Log4perl qw(:easy);
Log::Log4perl->easy_init($FATAL); Log::Log4perl->easy_init($FATAL);
my $logger = Log::Log4perl::get_logger; my $logger = Log::Log4perl::get_logger;
skipping to change at line 49 skipping to change at line 49
paths => [$pnm], paths => [$pnm],
finished_callback => sub { finished_callback => sub {
$slist->save_djvu( $slist->save_djvu(
path => $djvu, path => $djvu,
list_of_pages => [ $slist->{data}[0][2]{uuid} ], list_of_pages => [ $slist->{data}[0][2]{uuid} ],
metadata => \%metadata, metadata => \%metadata,
options => { options => {
set_timestamp => TRUE, set_timestamp => TRUE,
}, },
finished_callback => sub { Gtk3->main_quit }, finished_callback => sub { Gtk3->main_quit },
error_callback => error_callback =>
sub { pass('caught errors setting timestamp') } sub { pass('caught errors setting timestamp') }
); );
} }
); );
Gtk3->main; Gtk3->main;
my $info = capture( 'djvused', $djvu, qw(-e print-meta) ); my $info = capture( 'djvused', $djvu, qw(-e print-meta) );
like( $info, qr/1966-02-10/, 'metadata ModDate in DjVu' ); like( $info, qr/1966-02-10/, 'metadata ModDate in DjVu' );
######################### #########################
 End of changes. 3 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)