~ubuntu-branches/ubuntu/karmic/libimage-exiftool-perl/karmic

« back to all changes in this revision

Viewing changes to t/TestLib.pm

  • Committer: Bazaar Package Importer
  • Author(s): Mari Wang
  • Date: 2008-02-04 20:32:53 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080204203253-mpbal8trlfe1fz5d
Tags: 7.00-1
* Upload of new production release (Closes: #456430)
* Added Recommends: libcompress-zlib-perl (Closes: #435589)
* Package now includes iptc2xmp.args and xmp2iptc.args, they are put
  into /usr/share/libimage-exiftool/ (Closes: #436100)
* Updated standards-version (3.7.2 -> 3.7.3). No changes needed.
* Lots of updates and bugfixes compared to last debian version
  (6.90).  See the Changes file for details
* Upload sponsored by Petter Reinholdtsen

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
# test writing feature by writing specified information to JPEG file
213
213
# Inputs: 0) list reference to lists of SetNewValue arguments
214
214
#         1) test name, 2) test number, 3) optional source file name,
215
 
#         4) true to only check tags which were written
 
215
#         4) true to only check tags which were written (or list ref for tags to check)
216
216
# Returns: 1 if check passed
217
217
sub writeCheck($$$;$$)
218
218
{
222
222
    my $testfile = "t/${testname}_${testnum}_failed.$ext";
223
223
    my $exifTool = new Image::ExifTool;
224
224
    my @tags;
 
225
    if (ref $onlyWritten eq 'ARRAY') {
 
226
        @tags = @$onlyWritten;
 
227
        undef $onlyWritten;
 
228
    }
225
229
    foreach (@$writeInfo) {
226
230
        $exifTool->SetNewValue(@$_);
227
231
        push @tags, $$_[0] if $onlyWritten;
239
243
#------------------------------------------------------------------------------
240
244
# test verbose output
241
245
# Inputs: 0) test name, 1) test number, 2) Input file, 3) verbose level
242
 
# Returns: 0) ok value, 1) skip string if test must be skipped
 
246
# Returns: 0) true if test passed
243
247
sub testVerbose($$$$)
244
248
{
245
249
    my ($testname, $testnum, $infile, $verbose) = @_;