Debian Codegraph @

tests/languages/mermaid/full_sequencediagram.test

raw
1 sequenceDiagram
2 Alice->>John: Hello John, how are you?
3 John-->>Alice: Great!
4 Alice-)John: See you later!
5
6 sequenceDiagram
7 participant John
8 participant Alice
9 Alice->>John: Hello John, how are you?
10 John-->>Alice: Great!
11
12 sequenceDiagram
13 participant A as Alice
14 participant J as John
15 A->>J: Hello John, how are you?
16 J->>A: Great!
17
18 [Actor][Arrow][Actor]:Message text
19
20 sequenceDiagram
21 Alice->>John: Hello John, how are you?
22 activate John
23 John-->>Alice: Great!
24 deactivate John
25
26 sequenceDiagram
27 Alice->>+John: Hello John, how are you?
28 John-->>-Alice: Great!
29
30 sequenceDiagram
31 Alice->>+John: Hello John, how are you?
32 Alice->>+John: John, can you hear me?
33 John-->>-Alice: Hi Alice, I can hear you!
34 John-->>-Alice: I feel great!
35
36 sequenceDiagram
37 participant John
38 Note right of John: Text in note
39
40 sequenceDiagram
41 Alice->John: Hello John, how are you?
42 Note over Alice,John: A typical interaction
43
44 loop Loop text
45 ... statements ...
46 end
47
48 sequenceDiagram
49 Alice->John: Hello John, how are you?
50 loop Every minute
51 John-->Alice: Great!
52 end
53
54 alt Describing text
55 ... statements ...
56 else
57 ... statements ...
58 end
59
60 opt Describing text
61 ... statements ...
62 end
63
64 sequenceDiagram
65 Alice->>Bob: Hello Bob, how are you?
66 alt is sick
67 Bob->>Alice: Not so good :(
68 else is well
69 Bob->>Alice: Feeling fresh like a daisy
70 end
71 opt Extra response
72 Bob->>Alice: Thanks for asking
73 end
74
75 par [Action 1]
76 ... statements ...
77 and [Action 2]
78 ... statements ...
79 and [Action N]
80 ... statements ...
81 end
82
83 rect rgb(0, 255, 0)
84 ... content ...
85 end
86
87 rect rgba(0, 0, 255, .1)
88 ... content ...
89 end
90
91 sequenceDiagram
92 Alice->>John: Hello John, how are you?
93 %% this is a comment
94 John-->>Alice: Great!
95
96 sequenceDiagram
97 A->>B: I #9829; you!
98 B->>A: I #9829; you #infin; times more!
99
100 sequenceDiagram
101 autonumber
102 Alice->>John: Hello John, how are you?
103 loop Healthcheck
104 John->>John: Fight against hypochondria
105 end
106 Note right of John: Rational thoughts!
107 John-->>Alice: Great!
108 John->>Bob: How about you?
109 Bob-->>John: Jolly good!
110
111 ----------------------------------------------------
112
113 [
114 ["keyword", "sequenceDiagram"],
115
116 "\r\n Alice",
117 ["arrow", "->>"],
118 "John",
119 ["operator", ":"],
120 " Hello John, how are you?\r\n John",
121 ["arrow", "-->>"],
122 "Alice",
123 ["operator", ":"],
124 " Great!\r\n Alice",
125 ["arrow", "-)"],
126 "John",
127 ["operator", ":"],
128 " See you later!\r\n\r\n",
129
130 ["keyword", "sequenceDiagram"],
131
132 ["keyword", "participant"],
133 " John\r\n ",
134
135 ["keyword", "participant"],
136 " Alice\r\n Alice",
137 ["arrow", "->>"],
138 "John",
139 ["operator", ":"],
140 " Hello John, how are you?\r\n John",
141 ["arrow", "-->>"],
142 "Alice",
143 ["operator", ":"],
144 " Great!\r\n\r\n",
145
146 ["keyword", "sequenceDiagram"],
147
148 ["keyword", "participant"],
149 " A as Alice\r\n ",
150
151 ["keyword", "participant"],
152 " J as John\r\n A",
153 ["arrow", "->>"],
154 "J",
155 ["operator", ":"],
156 " Hello John, how are you?\r\n J",
157 ["arrow", "->>"],
158 "A",
159 ["operator", ":"],
160 " Great!\r\n\r\n",
161
162 ["text", "[Actor]"],
163 ["text", "[Arrow]"],
164 ["text", "[Actor]"],
165 ["operator", ":"],
166 "Message text\r\n\r\n",
167
168 ["keyword", "sequenceDiagram"],
169
170 "\r\n Alice",
171 ["arrow", "->>"],
172 "John",
173 ["operator", ":"],
174 " Hello John, how are you?\r\n ",
175
176 ["keyword", "activate"],
177 " John\r\n John",
178 ["arrow", "-->>"],
179 "Alice",
180 ["operator", ":"],
181 " Great!\r\n ",
182
183 ["keyword", "deactivate"],
184 " John\r\n\r\n",
185
186 ["keyword", "sequenceDiagram"],
187
188 "\r\n Alice",
189 ["arrow", "->>"],
190 "+John",
191 ["operator", ":"],
192 " Hello John, how are you?\r\n John",
193 ["arrow", "-->>"],
194 "-Alice",
195 ["operator", ":"],
196 " Great!\r\n\r\n",
197
198 ["keyword", "sequenceDiagram"],
199
200 "\r\n Alice",
201 ["arrow", "->>"],
202 "+John",
203 ["operator", ":"],
204 " Hello John, how are you?\r\n Alice",
205 ["arrow", "->>"],
206 "+John",
207 ["operator", ":"],
208 " John, can you hear me?\r\n John",
209 ["arrow", "-->>"],
210 "-Alice",
211 ["operator", ":"],
212 " Hi Alice, I can hear you!\r\n John",
213 ["arrow", "-->>"],
214 "-Alice",
215 ["operator", ":"],
216 " I feel great!\r\n\r\n",
217
218 ["keyword", "sequenceDiagram"],
219
220 ["keyword", "participant"],
221 " John\r\n ",
222
223 ["keyword", "Note right of"],
224 " John",
225 ["operator", ":"],
226 " Text in note\r\n\r\n",
227
228 ["keyword", "sequenceDiagram"],
229
230 "\r\n Alice",
231 ["arrow", "->"],
232 "John",
233 ["operator", ":"],
234 " Hello John, how are you?\r\n ",
235
236 ["keyword", "Note over"],
237 " Alice,John",
238 ["operator", ":"],
239 " A typical interaction\r\n\r\n",
240
241 ["keyword", "loop"], " Loop text\r\n... statements ...\r\n",
242 ["keyword", "end"],
243
244 ["keyword", "sequenceDiagram"],
245
246 "\r\n Alice",
247 ["arrow", "->"],
248 "John",
249 ["operator", ":"],
250 " Hello John, how are you?\r\n ",
251
252 ["keyword", "loop"],
253 " Every minute\r\n John",
254 ["arrow", "-->"],
255 "Alice",
256 ["operator", ":"],
257 " Great!\r\n ",
258
259 ["keyword", "end"],
260
261 ["keyword", "alt"], " Describing text\r\n... statements ...\r\n",
262 ["keyword", "else"],
263 "\r\n... statements ...\r\n",
264 ["keyword", "end"],
265
266 ["keyword", "opt"], " Describing text\r\n... statements ...\r\n",
267 ["keyword", "end"],
268
269 ["keyword", "sequenceDiagram"],
270
271 "\r\n Alice",
272 ["arrow", "->>"],
273 "Bob",
274 ["operator", ":"],
275 " Hello Bob, how are you?\r\n ",
276
277 ["keyword", "alt"],
278 " is sick\r\n Bob",
279 ["arrow", "->>"],
280 "Alice",
281 ["operator", ":"],
282 " Not so good ",
283 ["operator", ":"],
284 ["punctuation", "("],
285
286 ["keyword", "else"],
287 " is well\r\n Bob",
288 ["arrow", "->>"],
289 "Alice",
290 ["operator", ":"],
291 " Feeling fresh like a daisy\r\n ",
292
293 ["keyword", "end"],
294
295 ["keyword", "opt"],
296 " Extra response\r\n Bob",
297 ["arrow", "->>"],
298 "Alice",
299 ["operator", ":"],
300 " Thanks for asking\r\n ",
301
302 ["keyword", "end"],
303
304 ["keyword", "par"], ["text", "[Action 1]"],
305 "\r\n... statements ...\r\n",
306 ["keyword", "and"], ["text", "[Action 2]"],
307 "\r\n... statements ...\r\n",
308 ["keyword", "and"], ["text", "[Action N]"],
309 "\r\n... statements ...\r\n",
310 ["keyword", "end"],
311
312 ["keyword", "rect"], " rgb", ["text", "(0, 255, 0)"],
313 "\r\n... content ...\r\n",
314 ["keyword", "end"],
315
316 ["keyword", "rect"], " rgba", ["text", "(0, 0, 255, .1)"],
317 "\r\n... content ...\r\n",
318 ["keyword", "end"],
319
320 ["keyword", "sequenceDiagram"],
321
322 "\r\n Alice",
323 ["arrow", "->>"],
324 "John",
325 ["operator", ":"],
326 " Hello John, how are you?\r\n ",
327
328 ["comment", "%% this is a comment"],
329
330 "\r\n John",
331 ["arrow", "-->>"],
332 "Alice",
333 ["operator", ":"],
334 " Great!\r\n\r\n",
335
336 ["keyword", "sequenceDiagram"],
337
338 "\r\n A",
339 ["arrow", "->>"],
340 "B",
341 ["operator", ":"],
342 " I ",
343 ["entity", "#9829;"],
344 " you!\r\n B",
345 ["arrow", "->>"],
346 "A",
347 ["operator", ":"],
348 " I ",
349 ["entity", "#9829;"],
350 " you ",
351 ["entity", "#infin;"],
352 " times more!\r\n\r\n",
353
354 ["keyword", "sequenceDiagram"],
355
356 ["keyword", "autonumber"],
357
358 "\r\n Alice",
359 ["arrow", "->>"],
360 "John",
361 ["operator", ":"],
362 " Hello John, how are you?\r\n ",
363
364 ["keyword", "loop"],
365 " Healthcheck\r\n John",
366 ["arrow", "->>"],
367 "John",
368 ["operator", ":"],
369 " Fight against hypochondria\r\n ",
370
371 ["keyword", "end"],
372
373 ["keyword", "Note right of"],
374 " John",
375 ["operator", ":"],
376 " Rational thoughts!\r\n John",
377 ["arrow", "-->>"],
378 "Alice",
379 ["operator", ":"],
380 " Great!\r\n John",
381 ["arrow", "->>"],
382 "Bob",
383 ["operator", ":"],
384 " How about you?\r\n Bob",
385 ["arrow", "-->>"],
386 "John",
387 ["operator", ":"],
388 " Jolly good!"
389 ]