-
Notifications
You must be signed in to change notification settings - Fork 1
/
drive_test.bas
74 lines (54 loc) · 1.59 KB
/
drive_test.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
INCLUDE "drive.bas"
PRINT "{CLR}{DOWN}"
PRINT "drive module testing"
REM ============================================
REM Testing expected name of disk
REM Functions tested:
REM Disk_GetDiskName
REM ============================================
PRINT "{down}--------------------"
PRINT "type the name of the disk:"
DIM inputName AS STRING * 16
INPUT inputName
DIM diskName AS STRING * 16
diskName = Disk_GetDiskName(8)
IF inputName = diskName THEN
PRINT "pass"
ELSE
PRINT "fail, name was "; diskName
END IF
REM ============================================
REM Checking blocks free count
REM Functions tested:
REM Disk_GetBlocksFree
REM dskBlocksFree
REM ============================================
DIM free1 AS INT: free1 = Disk_GetBlocksFree(8)
DIM free2 AS INT: free2 = dskBlocksFree(8)
PRINT "{down}--------------------"
PRINT "checking blocks free..."
IF free1 = free2 THEN
PRINT "pass"
ELSE
PRINT "fail, first count "; free1; " second count "; free2
END IF
'rem - tests file delete routines.
'dim jj as byte
'print "{clr}"
'REM -- create files
'print "create file 1"
'OPEN 2,8,2, "@0:" + "testfile1" + ",s,w"
'PRINT #2,"stuff" : CLOSE 2
'print "create file 2"
'OPEN 2,8,2, "@0:" + "testfile2" + ",s,w"
'PRINT #2,"stuff" : CLOSE 2
'print "create file 3"
'OPEN 2,8,2, "@0:" + "testfile3" + ",s,w"
'PRINT #2,"stuff" : CLOSE 2
'print "create file 4"
'OPEN 2,8,2, "@0:" + "testfile4" + ",s,w"
'PRINT #2,"stuff" : CLOSE 2
'dim kk as byte
'kk = dskDeleteFiles("test*",8)
'print "num of files del:" + str$(kk)
'end