-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPathListsTest.Mod
61 lines (52 loc) · 1.6 KB
/
PathListsTest.Mod
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
MODULE PathListsTest;
IMPORT PathLists, T := Tests;
VAR ts : T.TestSet;
PROCEDURE TestEncodeDecode() : BOOLEAN;
VAR test, ok : BOOLEAN; src : ARRAY 1024 OF CHAR;
pl : PathLists.PathList;
BEGIN test := TRUE;
src := "/bin:/usr/bin:/usr/local/bin:/home/jane.doe/bin";
PathLists.Decode(src, pl, ok);
T.ExpectedBool(TRUE, ok, "Expected to decode src", test);
RETURN test
END TestEncodeDecode;
PROCEDURE TestLengthSetDelimiterFind() : BOOLEAN;
VAR test : BOOLEAN;
BEGIN test := TRUE;
T.ExpectedBool(TRUE, FALSE, "TestLengthSetDelimiterFind() not implemented.", test);
RETURN test
END TestLengthSetDelimiterFind;
PROCEDURE TestPrepend() : BOOLEAN;
VAR test : BOOLEAN;
BEGIN test := TRUE;
T.ExpectedBool(TRUE, FALSE, "TestPrepend() not implemented.", test);
RETURN test
END TestPrepend;
PROCEDURE TestAppend() : BOOLEAN;
VAR test : BOOLEAN;
BEGIN test := TRUE;
T.ExpectedBool(TRUE, FALSE, "TestAppend() not implemented. ", test);
RETURN test
END TestAppend;
PROCEDURE TestCut() : BOOLEAN;
VAR test : BOOLEAN;
BEGIN test := TRUE;
T.ExpectedBool(TRUE, FALSE, "TestCut() not implemented. ", test);
RETURN test
END TestCut;
PROCEDURE TestApply() : BOOLEAN;
VAR test : BOOLEAN;
BEGIN test := TRUE;
T.ExpectedBool(TRUE,FALSE, "TestApply() not implemented.", test);
RETURN test
END TestApply;
BEGIN
T.Init(ts, "Test PathLists");
T.Add(ts, TestEncodeDecode);
T.Add(ts, TestLengthSetDelimiterFind);
T.Add(ts, TestPrepend);
T.Add(ts, TestAppend);
T.Add(ts, TestCut);
T.Add(ts, TestApply);
ASSERT(T.Run(ts));
END PathListsTest.