Wire up the (available) tests.

This commit is contained in:
David Given
2021-08-01 14:58:46 +02:00
parent b7cca1b95b
commit b0a5174c0a
5 changed files with 196 additions and 29 deletions

View File

@@ -0,0 +1,8 @@
image_reader {
d64 {}
}
image_writer {
d64 {}
}

View File

@@ -5,13 +5,14 @@ srcfile=$tmp.src.img
fluxfile=$tmp.flux
destfile=$tmp.dest.img
format=$1
shift
trap "rm -f $srcfile $fluxfile $destfile" EXIT
dd if=/dev/urandom of=$srcfile bs=1M count=2 2>1
./fluxengine write $format -i $srcfile -d $fluxfile
./fluxengine read $format -s $fluxfile -o $destfile
./fluxengine write $format -i $srcfile -d $fluxfile "$@"
./fluxengine read $format -s $fluxfile -o $destfile "$@"
if [ ! -s $destfile ]; then
echo "Zero length output file!" >&2
exit 1

View File

@@ -0,0 +1,70 @@
image_reader {
img {
tracks: 80
sides: 1
trackdata {
sector_size: 524
}
trackdata {
track: 0
up_to_track: 15
sectors: 12
}
trackdata {
track: 16
up_to_track: 31
sectors: 11
}
trackdata {
track: 32
up_to_track: 47
sectors: 10
}
trackdata {
track: 48
up_to_track: 63
sectors: 9
}
trackdata {
track: 64
up_to_track: 79
sectors: 8
}
}
}
image_writer {
img {
tracks: 80
sides: 1
trackdata {
sector_size: 524
}
trackdata {
track: 0
up_to_track: 15
sectors: 12
}
trackdata {
track: 16
up_to_track: 31
sectors: 11
}
trackdata {
track: 32
up_to_track: 47
sectors: 10
}
trackdata {
track: 48
up_to_track: 63
sectors: 9
}
trackdata {
track: 64
up_to_track: 79
sectors: 8
}
}
}

View File

@@ -0,0 +1,70 @@
image_reader {
img {
tracks: 80
sides: 2
trackdata {
sector_size: 524
}
trackdata {
track: 0
up_to_track: 15
sectors: 12
}
trackdata {
track: 16
up_to_track: 31
sectors: 11
}
trackdata {
track: 32
up_to_track: 47
sectors: 10
}
trackdata {
track: 48
up_to_track: 63
sectors: 9
}
trackdata {
track: 64
up_to_track: 79
sectors: 8
}
}
}
image_writer {
img {
tracks: 80
sides: 2
trackdata {
sector_size: 524
}
trackdata {
track: 0
up_to_track: 15
sectors: 12
}
trackdata {
track: 16
up_to_track: 31
sectors: 11
}
trackdata {
track: 32
up_to_track: 47
sectors: 10
}
trackdata {
track: 48
up_to_track: 63
sectors: 9
}
trackdata {
track: 64
up_to_track: 79
sectors: 8
}
}
}