DNG.t 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Before "make install", this script should be runnable with "make test".
  2. # After "make install" it should work as "perl t/DNG.t".
  3. BEGIN { $| = 1; print "1..3\n"; $Image::ExifTool::noConfig = 1; }
  4. END {print "not ok 1\n" unless $loaded;}
  5. # test 1: Load the module(s)
  6. use Image::ExifTool 'ImageInfo';
  7. use Image::ExifTool::DNG;
  8. $loaded = 1;
  9. print "ok 1\n";
  10. use t::TestLib;
  11. my $testname = 'DNG';
  12. my $testnum = 1;
  13. # test 2: Extract information from DNG.dng
  14. {
  15. ++$testnum;
  16. my $exifTool = new Image::ExifTool;
  17. my $info = $exifTool->ImageInfo('t/images/DNG.dng');
  18. print 'not ' unless check($exifTool, $info, $testname, $testnum);
  19. print "ok $testnum\n";
  20. }
  21. # test 3: Test writing maker notes information
  22. {
  23. ++$testnum;
  24. my @writeInfo = (
  25. [ OwnerName => 'Just Me' ],
  26. [ OriginalDecisionData => "\xff\xff\xff\xff\x03\0\0\0\0\0\0\0\0\0\0\0\x08\0\0\0Test", Protected => 1 ],
  27. );
  28. my @tags = qw(OwnerName OriginalDecisionData Warning Error);
  29. print 'not ' unless writeCheck(\@writeInfo, $testname, $testnum, 't/images/DNG.dng', \@tags);
  30. print "ok $testnum\n";
  31. }
  32. # end