1[
2    {
3        "id": "b078",
4        "name": "Add simple action",
5        "category": [
6            "actions",
7            "simple"
8        ],
9        "setup": [
10            [
11                "$TC actions flush action simple",
12                0,
13                1,
14                255
15            ]
16        ],
17        "cmdUnderTest": "$TC actions add action simple sdata \"A triumph\" index 60",
18        "expExitCode": "0",
19        "verifyCmd": "$TC actions list action simple",
20        "matchPattern": "action order [0-9]*: Simple <A triumph>.*index 60 ref",
21        "matchCount": "1",
22        "teardown": [
23            "$TC actions flush action simple"
24        ]
25    },
26    {
27        "id": "4297",
28        "name": "Add simple action with change command",
29        "category": [
30            "actions",
31            "simple"
32        ],
33        "setup": [
34            [
35                "$TC actions flush action simple",
36                0,
37                1,
38                255
39            ]
40        ],
41        "cmdUnderTest": "$TC actions change action simple sdata \"Not changed\" index 60",
42        "expExitCode": "0",
43        "verifyCmd": "$TC actions list action simple",
44        "matchPattern": "action order [0-9]*: Simple <Not changed>.*index 60 ref",
45        "matchCount": "1",
46        "teardown": [
47            "$TC actions flush action simple"
48        ]
49    },
50    {
51        "id": "6d4c",
52        "name": "Add simple action with duplicate index",
53        "category": [
54            "actions",
55            "simple"
56        ],
57        "setup": [
58            [
59                "$TC actions flush action simple",
60                0,
61                1,
62                255
63            ],
64            "$TC actions add action simple sdata \"Aruba\" index 4"
65        ],
66        "cmdUnderTest": "$TC actions add action simple sdata \"Jamaica\" index 4",
67        "expExitCode": "255",
68        "verifyCmd": "$TC actions list action simple",
69        "matchPattern": "action order [0-9]*: Simple <Jamaica>.*ref",
70        "matchCount": "0",
71        "teardown": [
72            "$TC actions flush action simple"
73        ]
74    },
75    {
76        "id": "2542",
77        "name": "List simple actions",
78        "category": [
79            "actions",
80            "simple"
81        ],
82        "setup": [
83            [
84                "$TC actions flush action simple",
85                0,
86                1,
87                255
88            ],
89            "$TC actions add action simple sdata \"Rock\"",
90            "$TC actions add action simple sdata \"Paper\"",
91            "$TC actions add action simple sdata \"Scissors\" index 98"
92        ],
93        "cmdUnderTest": "$TC actions list action simple",
94        "expExitCode": "0",
95        "verifyCmd": "$TC actions list action simple",
96        "matchPattern": "action order [0-9]*: Simple <[A-Z][a-z]*>",
97        "matchCount": "3",
98        "teardown": [
99            "$TC actions flush action simple"
100        ]
101    },
102    {
103        "id": "ea67",
104        "name": "Delete simple action",
105        "category": [
106            "actions",
107            "simple"
108        ],
109        "setup": [
110            [
111                "$TC actions flush action simple",
112                0,
113                1,
114                255
115            ],
116            "$TC actions add action simple sdata \"Blinkenlights\" index 1"
117        ],
118        "cmdUnderTest": "$TC actions delete action simple index 1",
119        "expExitCode": "0",
120        "verifyCmd": "$TC actions list action simple",
121        "matchPattern": "action order [0-9]*: Simple <Blinkenlights>.*index 1 ref",
122        "matchCount": "0",
123        "teardown": [
124            "$TC actions flush action simple"
125        ]
126    },
127    {
128        "id": "8ff1",
129        "name": "Flush simple actions",
130        "category": [
131            "actions",
132            "simple"
133        ],
134        "setup": [
135            [
136                "$TC actions flush action simple",
137                0,
138                1,
139                255
140            ],
141            "$TC actions add action simple sdata \"Kirk\"",
142            "$TC actions add action simple sdata \"Spock\" index 50",
143            "$TC actions add action simple sdata \"McCoy\" index 9"
144        ],
145        "cmdUnderTest": "$TC actions flush action simple",
146        "expExitCode": "0",
147        "verifyCmd": "$TC actions list action simple",
148        "matchPattern": "action order [0-9]*: Simple <[A-Z][a-z]*>",
149        "matchCount": "0",
150        "teardown": [
151            ""
152        ]
153    },
154    {
155        "id": "b776",
156        "name": "Replace simple action with invalid goto chain control",
157        "category": [
158            "actions",
159            "simple"
160        ],
161        "setup": [
162            [
163                "$TC actions flush action simple",
164                0,
165                1,
166                255
167            ],
168            "$TC actions add action simple sdata \"hello\" pass index 90"
169        ],
170        "cmdUnderTest": "$TC actions replace action simple sdata \"world\" goto chain 42 index  90 cookie c1a0c1a0",
171        "expExitCode": "255",
172        "verifyCmd": "$TC actions list action simple",
173        "matchPattern": "action order [0-9]*: Simple <hello>.*index 90 ref",
174        "matchCount": "1",
175        "teardown": [
176            "$TC actions flush action simple"
177        ]
178    },
179    {
180        "id": "8d07",
181        "name": "Verify cleanup of failed actions batch add",
182        "category": [
183            "actions",
184            "simple"
185        ],
186        "setup": [
187            [
188                "$TC actions flush action simple",
189                0,
190                1,
191                255
192            ],
193            "$TC actions add action simple sdata \"2\" index 2",
194            [
195                "$TC actions add action simple sdata \"1\" index 1 action simple sdata \"2\" index 2",
196                255
197            ],
198            "$TC actions flush action simple"
199        ],
200        "cmdUnderTest": "$TC actions add action simple sdata \"2\" index 2",
201        "expExitCode": "0",
202        "verifyCmd": "$TC actions list action simple",
203        "matchPattern": "action order [0-9]*: Simple <2>.*index 2 ref",
204        "matchCount": "1",
205        "teardown": [
206            "$TC actions flush action simple"
207        ]
208    },
209    {
210        "id": "a68a",
211        "name": "Verify cleanup of failed actions batch change",
212        "category": [
213            "actions",
214            "simple"
215        ],
216        "setup": [
217            [
218                "$TC actions flush action simple",
219                0,
220                1,
221                255
222            ],
223            [
224                "$TC actions change action simple sdata \"1\" index 1 action simple sdata \"2\" goto chain 42 index 2",
225                255
226            ],
227            "$TC actions flush action simple"
228        ],
229        "cmdUnderTest": "$TC actions add action simple sdata \"1\" index 1",
230        "expExitCode": "0",
231        "verifyCmd": "$TC actions list action simple",
232        "matchPattern": "action order [0-9]*: Simple <1>.*index 1 ref",
233        "matchCount": "1",
234        "teardown": [
235            "$TC actions flush action simple"
236        ]
237    }
238]
239