Debian Codegraph @

scripts/tests/test.sh

raw symbols SCIP
1 set -e
2
3 GW="gw --bt"
4
5 rmscip-shell system . . rm. -rf .test
6 mkdirscip-shell system . . mkdir. -p .test
7 pushd .test
8
9 # IBM
10 ddscip-shell system . . dd. if=/dev/urandomscip-shell filesystem . . `/dev/urandom`. of=olivetti_m20.img bs=1024 count=280
11 $GW convert --format=olivetti.m20 olivetti_m20.img a.imd
12 $GW convert --format=olivetti.m20 a.imd a1.hfe
13 $GW convert a.imd a2.hfe
14 $GW convert --format=olivetti.m20 a1.hfe a1.img
15 $GW convert --format=olivetti.m20 a2.hfe a2.img
16 diffscip-shell system . . diff. -u a1.img a2.img
17 # Punch padding holes in the original IMG before we diff
18 for i in 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 ; do
19 ddscip-shell system . . dd. if=/dev/zeroscip-shell filesystem . . `/dev/zero`. of=olivetti_m20.img bs=128 seek=$i count=1 conv=notrunc;
20 done
21 diffscip-shell system . . diff. -u a1.img olivetti_m20.img
22
23 # Amiga
24 ddscip-shell system . . dd. if=/dev/urandomscip-shell filesystem . . `/dev/urandom`. of=a.adf bs=1024 count=880
25 mkdirscip-shell system . . mkdir. a
26 $GW convert a.adf a/00.0.raw
27 $GW convert a/00.0.raw b.adf
28 diffscip-shell system . . diff. -u a.adf b.adf
29
30 # C64
31 ddscip-shell system . . dd. if=/dev/urandomscip-shell filesystem . . `/dev/urandom`. of=a.d64 bs=256 count=683
32 $GW convert --tracks=c=0-34 a.d64 a.scp::revs=1
33 $GW convert a.scp b.d64
34 diffscip-shell system . . diff. -u a.d64 b.d64
35
36 # Mac
37 ddscip-shell system . . dd. if=/dev/urandomscip-shell filesystem . . `/dev/urandom`. of=a.img bs=1024 count=800
38 $GW convert --format=mac.800 a.img a.scp::revs=1
39 $GW convert --format=mac.800 a.scp b.img
40 diffscip-shell system . . diff. -u a.img b.img
41
42 # Bitcell
43 $GW convert --format=raw.250 a.scp a.hfe
44
45 # DEC-RX02
46 ddscip-shell system . . dd. if=/dev/urandomscip-shell filesystem . . `/dev/urandom`. of=rx02.img bs=256 count=2002
47 $GW convert --format=dec.rx02 rx02.img rx02_a.scp
48 $GW convert --format=dec.rx02 rx02_a.scp rx02_a.img 2>&1 | teescip-shell system . . tee. rx02.log
49 diffscip-shell system . . diff. -u rx02.img rx02_a.img
50 grepscip-shell system . . grep. Unknown rx02.log && exit 1
51
52 # FDI import
53 echoscip-shell system . . echo. -en "\x00\x00\x00\x00\x90\x00\x00\x00" >a.fdi
54 echoscip-shell system . . echo. -en "\x00\x10\x00\x00\x00\x40\x13\x00" >>a.fdi
55 echoscip-shell system . . echo. -en "\x00\x04\x00\x00\x08\x00\x00\x00" >>a.fdi
56 echoscip-shell system . . echo. -en "\x02\x00\x00\x00\x4d\x00\x00\x00" >>a.fdi
57 ddscip-shell system . . dd. if=/dev/zeroscip-shell filesystem . . `/dev/zero`. of=a.fdi bs=16 seek=2 count=254
58 ddscip-shell system . . dd. if=/dev/urandomscip-shell filesystem . . `/dev/urandom`. of=a.img bs=4096 count=308
59 catscip-shell system . . cat. a.img >>a.fdi
60 $GW convert a.fdi a.scp
61 $GW convert --format=pc98.2hd a.scp b.img
62 diffscip-shell system . . diff. -u a.img b.img
63
64 popd