/
insert_fn.mux
122 lines (122 loc) · 2.76 KB
/
insert_fn.mux
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#
# insert_fn.mux - Test Cases for insert().
# $Id$
#
# Strategy: Exercise color and UTF-8 in combination with insert() behaviors.
#
@create test_insert_fn
-
@set test_insert_fn=INHERIT QUIET
-
#
# Beginning of Test Cases
#
&tr.tc000 test_insert_fn=
@log smoke=Beginning insert() test cases.
-
#
# Test Case #1 - Help file examples.
#
&tr.tc001 test_insert_fn=
@if strmatch(
setr(0,sha1(
[insert(This is a test, 4, new)]
[insert(Yet@Another@List, 3, Funky, @)]
)
),
406626B7163831461CDED124D892909E9E351FCB
)=
{
@log smoke=TC001: Help file examples. Succeeded.
},
{
@log smoke=TC001: Help file examples. Failed (%q0).
}
-
#
# Test Case #2 - Empty list. ASCII. Positive positions.
#
&tr.tc002 test_insert_fn=
@if strmatch(
setr(0,sha1(
[iter(0 1 2,## [insert(,##,Pear,|)])]
)
),
6A543151C6BDF80889FEAF3A53079DE952657E2A
)=
{
@log smoke=TC002: Empty list, ASCII, positive positions. Succeeded.
},
{
@log smoke=TC002: Empty list, ASCII, positive positions. Failed (%q0).
}
-
#
# Test Case #3 - Non-empty lists. ASCII. Positive positions.
#
&tr.tc003 test_insert_fn=
@if strmatch(
setr(0,sha1(
[iter(0 1 2 3,## [insert(|,##,Pear,|)])]
[iter(0 1 2 3 4,## [insert(||,##,Pear,|)])]
[iter(0 1 2 3 4 5,## [insert(|||,##,Pear,|)])]
)
),
7CEB5283E8F723EF34A3468AE1CAD76D36517DCF
)=
{
@log smoke=TC003: Non-empty lists, ASCII, positive positions. Succeeded.
},
{
@log smoke=TC003: Non-empty lists, ASCII, positive positions. Failed (%q0).
}
-
#
# Test Case #4 - Empty list. ASCII. Negative positions.
#
&tr.tc004 test_insert_fn=
@if strmatch(
setr(0,sha1(
[iter(-2 -1,## [insert(,##,Pear,|)])]
)
),
FF317BAF06BA80EED00C1E604E5A94C16EADAA8F
)=
{
@log smoke=TC004: Empty list, ASCII, negative positions. Succeeded.
},
{
@log smoke=TC004: Empty list, ASCII, negative positions. Failed (%q0).
}
-
#
# Test Case #5 - Non-empty lists. ASCII. Negative positions.
#
&tr.tc005 test_insert_fn=
@if strmatch(
setr(0,sha1(
[iter(-3 -2 -1,## [insert(|,##,Pear,|)])]
[iter(-4 -3 -2 -1,## [insert(||,##,Pear,|)])]
[iter(-5 -4 -3 -2 -1,## [insert(|||,##,Pear,|)])]
)
),
377189E5484C2F769375C40A0540080FF649CE2F
)=
{
@log smoke=TC005: Non-empty lists, ASCII, negative positions. Succeeded.;
@trig me/tr.done
},
{
@log smoke=TC005: Non-empty lists, ASCII, negative positions. Failed (%q0).;
@trig me/tr.done
}
-
&tr.done test_insert_fn=
@log smoke=End insert() test cases.;
@notify smoke
-
drop test_insert_fn
-
#
# End of Test Cases
#