Skip to content

Commit 6bc039c

Browse files
committed
test: vhs tests
1 parent abb1831 commit 6bc039c

File tree

7 files changed

+696
-8
lines changed

7 files changed

+696
-8
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ jobs:
2626
clj-kondo: latest
2727
cljfmt: latest
2828

29+
- name: Install vhs
30+
uses: charmbracelet/vhs-action@v1
31+
with:
32+
path:
33+
- 'docs/examples/vhs/pomodoro.tape'
34+
- 'docs/examples/vhs/download.tape'
35+
2936
- uses: actions/cache@v4
3037
with:
3138
path: |
@@ -43,6 +50,12 @@ jobs:
4350
- name: Test
4451
run: clojure -M:test
4552

53+
- name: Test vhs
54+
run: |
55+
ls -lahrtR
56+
diff pomodoro.ascii docs/examples/test/pomodoro.ascii
57+
diff download.ascii docs/examples/test/download.ascii
58+
4659
- name: Build JAR
4760
run: clojure -T:build jar
4861

docs/examples/images/download.gif

176 KB
Loading

docs/examples/images/pomodoro.gif

-281 KB
Loading

docs/examples/test/download.ascii

Lines changed: 310 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,310 @@
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+
> clojure -M -m examples.download
108+
109+
110+
111+
112+
113+
114+
115+
116+
117+
118+
119+
120+
121+
122+
123+
────────────────────────────────────────────────────────────────────────────────
124+
> clojure -M -m examples.download
125+
126+
127+
128+
129+
130+
131+
132+
133+
134+
135+
136+
137+
138+
139+
140+
────────────────────────────────────────────────────────────────────────────────
141+
> clojure -M -m examples.download
142+
Download Demo
143+
Demonstrating all progress bar styles
144+
145+
default ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
146+
ascii ------------------------- 0%
147+
thin ───────────────────────── 0%
148+
thick ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 0%
149+
blocks ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
150+
arrows 0%
151+
dots ○○○○○○○○○○○○○○○○○○○○○○○○○ 0%
152+
brackets [ ] 0%
153+
154+
Press Space to start download, Q to quit
155+
156+
157+
────────────────────────────────────────────────────────────────────────────────
158+
> clojure -M -m examples.download
159+
Download Demo
160+
Demonstrating all progress bar styles
161+
162+
default ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
163+
ascii ------------------------- 0%
164+
thin ───────────────────────── 0%
165+
thick ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 0%
166+
blocks ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
167+
arrows 0%
168+
dots ○○○○○○○○○○○○○○○○○○○○○○○○○ 0%
169+
brackets [ ] 0%
170+
171+
Press Space to start download, Q to quit
172+
173+
174+
────────────────────────────────────────────────────────────────────────────────
175+
> clojure -M -m examples.download
176+
Download Demo
177+
Demonstrating all progress bar styles
178+
179+
default ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
180+
ascii ------------------------- 0%
181+
thin ───────────────────────── 0%
182+
thick ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 0%
183+
blocks ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
184+
arrows 0%
185+
dots ○○○○○○○○○○○○○○○○○○○○○○○○○ 0%
186+
brackets [ ] 0%
187+
188+
Press Space to start download, Q to quit
189+
190+
191+
────────────────────────────────────────────────────────────────────────────────
192+
> clojure -M -m examples.download
193+
Download Demo
194+
Demonstrating all progress bar styles
195+
196+
default ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
197+
ascii ------------------------- 0%
198+
thin ───────────────────────── 0%
199+
thick ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 0%
200+
blocks ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
201+
arrows 0%
202+
dots ○○○○○○○○○○○○○○○○○○○○○○○○○ 0%
203+
brackets [ ] 0%
204+
205+
Downloading... Press R to reset, Q to quit
206+
207+
208+
────────────────────────────────────────────────────────────────────────────────
209+
> clojure -M -m examples.download
210+
Download Demo
211+
Demonstrating all progress bar styles
212+
213+
default █████████████████████████ 100% Done!
214+
ascii ######################### 100% Done!
215+
thin ━━━━━━━━━━━━━━━━━━━━━━━━━ 100% Done!
216+
thick █████████████████████████ 100% Done!
217+
blocks ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100% Done!
218+
arrows >>>>>>>>>>>>>>>>>>>>>>>>> 100% Done!
219+
dots ●●●●●●●●●●●●●●●●●●●●●●●●● 100% Done!
220+
brackets [=======================] 100% Done!
221+
222+
All downloads complete!
223+
224+
Press R to restart, Q to quit
225+
────────────────────────────────────────────────────────────────────────────────
226+
> clojure -M -m examples.download
227+
Download Demo
228+
Demonstrating all progress bar styles
229+
230+
default ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
231+
ascii ------------------------- 0%
232+
thin ───────────────────────── 0%
233+
thick ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 0%
234+
blocks ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
235+
arrows 0%
236+
dots ○○○○○○○○○○○○○○○○○○○○○○○○○ 0%
237+
brackets [ ] 0%
238+
239+
Press Space to start download, Q to quit
240+
241+
242+
────────────────────────────────────────────────────────────────────────────────
243+
> clojure -M -m examples.download
244+
Download Demo
245+
Demonstrating all progress bar styles
246+
247+
default ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
248+
ascii ------------------------- 0%
249+
thin ───────────────────────── 0%
250+
thick ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 0%
251+
blocks ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
252+
arrows 0%
253+
dots ○○○○○○○○○○○○○○○○○○○○○○○○○ 0%
254+
brackets [ ] 0%
255+
256+
Press Space to start download, Q to quit
257+
258+
259+
────────────────────────────────────────────────────────────────────────────────
260+
> clojure -M -m examples.download
261+
Download Demo
262+
Demonstrating all progress bar styles
263+
264+
default ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
265+
ascii ------------------------- 0%
266+
thin ───────────────────────── 0%
267+
thick ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 0%
268+
blocks ░░░░░░░░░░░░░░░░░░░░░░░░░ 0%
269+
arrows 0%
270+
dots ○○○○○○○○○○○○○○○○○○○○○○○○○ 0%
271+
brackets [ ] 0%
272+
273+
Downloading... Press R to reset, Q to quit
274+
275+
276+
────────────────────────────────────────────────────────────────────────────────
277+
> clojure -M -m examples.download
278+
Download Demo
279+
Demonstrating all progress bar styles
280+
281+
default ██████░░░░░░░░░░░░░░░░░░░ 24%
282+
ascii ######------------------- 26%
283+
thin ━━━━━━─────────────────── 27%
284+
thick █████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 21%
285+
blocks ▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░ 24%
286+
arrows >>>>>> 26%
287+
dots ●●●●●○○○○○○○○○○○○○○○○○○○○ 23%
288+
brackets [====== ] 26%
289+
290+
Downloading... Press R to reset, Q to quit
291+
292+
293+
────────────────────────────────────────────────────────────────────────────────
294+
> clojure -M -m examples.download
295+
Download Demo
296+
Demonstrating all progress bar styles
297+
298+
default ██████░░░░░░░░░░░░░░░░░░░ 24%
299+
ascii ######------------------- 26%
300+
thin ━━━━━━─────────────────── 27%
301+
thick █████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 21%
302+
blocks ▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░ 24%
303+
arrows >>>>>> 26%
304+
dots ●●●●●○○○○○○○○○○○○○○○○○○○○ 23%
305+
brackets [====== ] 26%
306+
307+
Downloading... Press R to reset, Q to quit
308+
309+
310+
────────────────────────────────────────────────────────────────────────────────

0 commit comments

Comments
 (0)