Sha256: c8a019d2a0be27a544f5cde05250e6173507b7a28df55cf7d3e51b39ddd43ead
Contents?: true
Size: 1.53 KB
Versions: 3
Compression:
Stored size: 1.53 KB
Contents
#make sure the relevant folder with our libraries is in the require path lib_path=File.expand_path(File.dirname(__FILE__)+"//..//lib") $:.unshift(lib_path) unless $:.include?(lib_path) require 'test/unit' require 'DSK' class TestPascalDisks <Test::Unit::TestCase def test_other_dsk_types dsk=DSK.new() assert(dsk.file_system!=:pascal,"empty DSK should not be Pascal format") dskname=File.dirname(__FILE__)+"//dos33_with_adt.dsk" dsk=DSK.read(dskname) assert(dsk.file_system!=:pascal,"#{dskname} should not be Pascal format") dskname=File.dirname(__FILE__)+"//nadol.dsk" dsk=DSK.read(dskname) assert(dsk.file_system!=:pascal,"#{dskname} should not be Pascal format") end def test_simple_pascal_disk dskname=File.dirname(__FILE__)+"//Algebra Mentor (19xx)(John C. Miller)(Disk 1 of 7 Side A)(Student Disk 1).dsk.gz" dsk=DSK.read(dskname) assert_equal(:pascal,dsk.file_system,"#{dskname} should have Pascal file system") assert_equal("A1011",dsk.volume_name) assert(dsk.files.length>0,"#{dskname} should have at least one file") end def test_pascal_foto_disk dskname=File.dirname(__FILE__)+"//camps.dsk.gz" dsk=DSK.read(dskname) assert_equal(:pascal,dsk.file_system,"#{dskname} should have Pascal file system") assert_equal("DIARRHE",dsk.volume_name) assert(dsk.files.length>0,"#{dskname} should have at least one file") non_foto_file=dsk.files["SYSTEM.MISCINFO"] assert(!non_foto_file.can_be_picture?) foto_file=dsk.files["CAMPS.FOTO"] assert(foto_file.can_be_picture?) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dsktool-0.4.2 | test/tc_pascal_disks.rb |
dsktool-0.4.1 | test/tc_pascal_disks.rb |
dsktool-0.5.1 | test/tc_pascal_disks.rb |