1# Before "make install", this script should be runnable with "make test". 2# After "make install" it should work as "perl t/EXE.t". 3 4BEGIN { 5 $| = 1; print "1..7\n"; $Image::ExifTool::configFile = ''; 6 require './t/TestLib.pm'; t::TestLib->import(); 7} 8END {print "not ok 1\n" unless $loaded;} 9 10# test 1: Load the module(s) 11use Image::ExifTool 'ImageInfo'; 12use Image::ExifTool::EXE; 13$loaded = 1; 14print "ok 1\n"; 15 16my $testname = 'EXE'; 17my $testnum = 1; 18 19# tests 2-7: Extract information from various types of executable files and libraries 20{ 21 my $exifTool = new Image::ExifTool; 22 my $ext; 23 foreach $ext ('exe', 'macho', 'elf', 'a', 'so', 'dylib') { 24 ++$testnum; 25 my $info = $exifTool->ImageInfo("t/images/EXE.$ext", '-system:all'); 26 print 'not ' unless check($exifTool, $info, $testname, $testnum); 27 print "ok $testnum\n"; 28 } 29} 30 31 32# end 33