cd %~p0
cd i7010
rm test.log
set noasync
set cpu 80k prot float pri
set console -n -q log=test.log
at mta0 -r -q -f p7b diag.bin
at mta1 -n -q t1.tp
at mta2 -n -q t2.tp
at mtb1 -n -q t3.tp
at mtb2 -n -q t4.tp
;set debug -n d.log
;set cpu hist=2000
;set cpu debug=detail;cmd;pri
;set mta debug=detail;cmd;exp;data
;set inq debug=exp;detail;data;cmd
;set lp debug=cmd;detail
;set ch debug=detail;channel;ch1;data;cmd
;set cdr debug=card;cmd;detail;data
;set cdp debug=card;cmd;detail;data
att lp -n -q diag.lst
expect "OPTION?" send "C0\r"; continue
bo mta0
cont
cont
cont
cont
echo "C022 Manual testing"
set mta0 rewind
reset
expect "OPTION?" send "CU\r"; continue
bo mta0
echo "CU26 not working yet"
set mta0 rewind
reset
expect "OPTION?" send "T0\r"; continue
echo "Expect error 17 on T020C test"
bo mta0
expect "OPTION?" reset 
reset
cont
set mta0 rewind
reset
expect "OPTION?" send "W0\r"; continue
expect "OPTION?" reset 
expect "REQ.SPACE SUPPRESS TAD" send "1\r"; continue
bo mta0
set ch1 urec=lp 
cont
set mta0 rewind
reset
set ch1 urec=NONE 
att cdr0 st02.txt
att cdp0 -n st02.out
expect "OPTION?" send "ST02\r"; continue
expect "OPTION?" reset 
bo mta0
del t1.tp
del t2.tp
del t3.tp
del t4.tp
quit
