mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-21 17:29:55 +00:00
Updated for multiple logical disks and added test cases for UniDOS
formatted disks.
This commit is contained in:
parent
6a59567b16
commit
18e9cd0450
@ -51,11 +51,11 @@ public class DiskHelperTest extends TestCase {
|
||||
}
|
||||
|
||||
public void testLoadDos33() throws IOException {
|
||||
FormattedDisk disk = showDirectory("C:/My Apple2/Disks/DOS 3.3.po");
|
||||
assertApplesoftFile(disk, "HELLO");
|
||||
assertIntegerFile(disk, "ANIMALS");
|
||||
assertTextFile(disk, "APPLE PROMS");
|
||||
assertBinaryFile(disk, "BOOT13");
|
||||
FormattedDisk[] disks = showDirectory("C:/My Apple2/Disks/DOS 3.3.po");
|
||||
assertApplesoftFile(disks[0], "HELLO");
|
||||
assertIntegerFile(disks[0], "ANIMALS");
|
||||
assertTextFile(disks[0], "APPLE PROMS");
|
||||
assertBinaryFile(disks[0], "BOOT13");
|
||||
}
|
||||
|
||||
public void testLoadMaster() throws IOException {
|
||||
@ -67,10 +67,10 @@ public class DiskHelperTest extends TestCase {
|
||||
}
|
||||
|
||||
public void testLoadProdos() throws IOException {
|
||||
FormattedDisk disk = showDirectory("C:/My Apple2/Disks/Prodos.dsk");
|
||||
assertApplesoftFile(disk, "COPY.ME");
|
||||
assertBinaryFile(disk, "SETTINGS");
|
||||
assertBinaryFile(disk, "PRODOS");
|
||||
FormattedDisk[] disks = showDirectory("C:/My Apple2/Disks/Prodos.dsk");
|
||||
assertApplesoftFile(disks[0], "COPY.ME");
|
||||
assertBinaryFile(disks[0], "SETTINGS");
|
||||
assertBinaryFile(disks[0], "PRODOS");
|
||||
}
|
||||
|
||||
public void testLoadMarbleMadness() throws IOException {
|
||||
@ -90,11 +90,11 @@ public class DiskHelperTest extends TestCase {
|
||||
}
|
||||
|
||||
public void testPhan2d1() throws IOException {
|
||||
FormattedDisk disk = showDirectory("C:/My Apple2/Disks/phan2d1.dsk");
|
||||
assertApplesoftFile(disk, "PHANTASIE II");
|
||||
assertBinaryFile(disk, "TWN21");
|
||||
assertTextFile(disk, "ITEM");
|
||||
assertGraphicsFile(disk, "ICE DRAGON");
|
||||
FormattedDisk[] disks = showDirectory("C:/My Apple2/Disks/phan2d1.dsk");
|
||||
assertApplesoftFile(disks[0], "PHANTASIE II");
|
||||
assertBinaryFile(disks[0], "TWN21");
|
||||
assertTextFile(disks[0], "ITEM");
|
||||
assertGraphicsFile(disks[0], "ICE DRAGON");
|
||||
}
|
||||
|
||||
public void testPhan2d2() throws IOException {
|
||||
@ -110,13 +110,23 @@ public class DiskHelperTest extends TestCase {
|
||||
}
|
||||
|
||||
public void testCavernsOfFreitag() throws IOException {
|
||||
FormattedDisk disk = showDirectory("C:/My Apple2/Disks/CavernsOfFreitag.dsk");
|
||||
assertGraphicsFile(disk, "TITLE.PIC");
|
||||
FormattedDisk[] disks = showDirectory("C:/My Apple2/Disks/CavernsOfFreitag.dsk");
|
||||
assertGraphicsFile(disks[0], "TITLE.PIC");
|
||||
}
|
||||
|
||||
protected FormattedDisk showDirectory(String imageName) throws IOException {
|
||||
public void testUniDosD3110() throws IOException {
|
||||
showDirectory("C:/My Apple2/Disks/UniDOS/D3110.dsk");
|
||||
}
|
||||
|
||||
public void testUniDosD3151() throws IOException {
|
||||
showDirectory("C:/My Apple2/Disks/UniDOS/D3151.dsk");
|
||||
}
|
||||
|
||||
protected FormattedDisk[] showDirectory(String imageName) throws IOException {
|
||||
Disk disk = new Disk(imageName);
|
||||
FormattedDisk formattedDisk = disk.getFormattedDisk();
|
||||
FormattedDisk[] formattedDisks = disk.getFormattedDisks();
|
||||
for (int i=0; i<formattedDisks.length; i++) {
|
||||
FormattedDisk formattedDisk = formattedDisks[i];
|
||||
System.out.println();
|
||||
System.out.println(formattedDisk.getDiskName());
|
||||
List files = formattedDisk.getFiles();
|
||||
@ -131,8 +141,8 @@ public class DiskHelperTest extends TestCase {
|
||||
System.out.println();
|
||||
|
||||
showDiskUsage(formattedDisk);
|
||||
|
||||
return formattedDisk;
|
||||
}
|
||||
return formattedDisks;
|
||||
}
|
||||
|
||||
protected void showFiles(List files, String indent) {
|
||||
|
Loading…
Reference in New Issue
Block a user