APE.t 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Before "make install", this script should be runnable with "make test".
  2. # After "make install" it should work as "perl t/APE.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::APE;
  8. $loaded = 1;
  9. print "ok 1\n";
  10. use t::TestLib;
  11. my $testname = 'APE';
  12. my $testnum = 1;
  13. # test 2: Extract information from APE test file
  14. {
  15. ++$testnum;
  16. my $exifTool = new Image::ExifTool;
  17. my $info = $exifTool->ImageInfo('t/images/APE.ape');
  18. print 'not ' unless check($exifTool, $info, $testname, $testnum);
  19. print "ok $testnum\n";
  20. }
  21. # test 3: Extract information from MCP test file containing 3 different
  22. # types of meta information: ID3v1, ID3v2 and APE
  23. {
  24. ++$testnum;
  25. my $exifTool = new Image::ExifTool;
  26. my $info = $exifTool->ImageInfo('t/images/APE.mpc');
  27. print 'not ' unless check($exifTool, $info, $testname, $testnum);
  28. print "ok $testnum\n";
  29. }
  30. # end