Skip to content

Commit af5aec6

Browse files
authored
Merge pull request #36 from attogram/jules-attempt-005
Fix tour-the-gallery.sh and repair test suite
2 parents ac94063 + 4108e0c commit af5aec6

28 files changed

+54
-3313
lines changed

docs/jules.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,11 @@ This document provides some specific knowledge required for working on this scre
3737

3838
## Testing
3939

40-
I should not attempt to run the tests in this repository. I have encountered a persistent internal error when trying to install the test dependencies. The error is `ValueError: Unexpected error: return_code: 1 stderr_contents: "cat: /app/tests/libs/bats-assert: Is a directory\n"`. This seems to be a tooling issue. If I need to run tests, I should inform the user.
40+
The tests for this project are written using the `bats` testing framework. Here are some key things to know about the test suite:
41+
42+
- **Dependencies**: The tests require `bats`, `bats-support`, and `bats-assert`. These are not checked in to the repository and need to be installed. I have found that cloning them with `git` can be unreliable in this environment. It is better to download the release tarballs and extract them.
43+
- **Test Structure**: The main test file is `tests/tests.bats`. It is responsible for testing the main `screensaver.sh` script. There are also individual test files for each screensaver in the `tests` directory.
44+
- **Running Tests**: The tests should be run from the root of the repository using the command `bats tests`. This will execute all the `.bats` files in the `tests` directory.
45+
- **Paths**: The test scripts are written with the assumption that they are being run from the root of the repository. All paths in the test files should be relative to the root.
46+
- **`timeout` and Assertions**: Many of the tests use `timeout` to run the screensavers for a short period. Since the screensavers are designed to run indefinitely, `timeout` will kill them, resulting in a non-zero exit code. Therefore, the tests should use `assert_failure` to check for this expected failure, not `assert_success`.
47+
- **Environment Limitations**: The testing environment can be restrictive. Commands like `cd`, `pwd`, and `git restore` may not work as expected. It's important to be aware of these limitations and find workarounds when necessary.

gallery/alpha/alpha.cast

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +0,0 @@
1-
{"version": 2, "width": 80, "height": 20, "timestamp": 1755955046, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
2-
[0.720489, "o", "\u001b[19;80H\u001b[38;5;62m█"]
3-
[1.422447, "o", "\u001b[1;76H\u001b[38;5;191m█"]
4-
[2.124383, "o", "\u001b[19;69H\u001b[38;5;202m█"]
5-
[2.826252, "o", "\u001b[10;64H\u001b[38;5;105m█"]
6-
[3.353391, "r", "120x29"]
7-
[3.390795, "r", "120x28"]
8-
[3.407873, "r", "120x25"]
9-
[3.42401, "r", "120x24"]
10-
[3.439409, "r", "120x22"]
11-
[3.456122, "r", "120x20"]
12-
[3.472124, "r", "120x18"]
13-
[3.48905, "r", "120x17"]
14-
[3.504977, "r", "120x16"]
15-
[3.528175, "o", "\u001b[16;44H\u001b[38;5;152m█"]
16-
[3.538063, "r", "120x15"]
17-
[3.783474, "r", "120x16"]
18-
[3.800455, "r", "120x20"]
19-
[3.816147, "r", "120x23"]
20-
[3.832598, "r", "120x26"]
21-
[3.849171, "r", "120x28"]
22-
[3.865342, "r", "120x29"]
23-
[3.881795, "r", "120x30"]
24-
[3.898557, "r", "120x31"]
25-
[3.931464, "r", "120x32"]
26-
[4.229902, "o", "\u001b[8;36H\u001b[38;5;146m█"]
27-
[4.931513, "o", "\u001b[9;56H\u001b[38;5;246m█"]
28-
[5.52677, "r", "120x31"]
29-
[5.560157, "r", "120x29"]
30-
[5.577672, "r", "120x26"]
31-
[5.593264, "r", "120x24"]
32-
[5.609105, "r", "120x22"]
33-
[5.625556, "r", "120x20"]
34-
[5.633457, "o", "\u001b[18;35H\u001b[38;5;49m█"]
35-
[5.642241, "r", "120x18"]
36-
[5.708351, "r", "120x19"]
37-
[5.854223, "r", "120x20"]
38-
[5.872922, "r", "120x21"]
39-
[5.889244, "r", "120x25"]
40-
[5.906034, "r", "120x29"]
41-
[5.92242, "r", "120x32"]
42-
[5.938984, "r", "120x34"]
43-
[6.187881, "r", "120x33"]
44-
[6.33527, "o", "\u001b[10;46H\u001b[38;5;161m█"]
45-
[6.42541, "r", "120x32"]
46-
[6.450942, "r", "120x31"]
47-
[6.467893, "r", "120x30"]
48-
[6.550745, "r", "120x29"]
49-
[6.616288, "r", "120x28"]
50-
[6.632526, "r", "120x27"]
51-
[6.665999, "r", "120x26"]
52-
[6.682584, "r", "120x24"]
53-
[6.699313, "r", "120x23"]
54-
[6.901006, "r", "120x24"]
55-
[7.004804, "r", "120x25"]
56-
[7.037282, "o", "\u001b[9;43H\u001b[38;5;156m█"]
57-
[7.738989, "o", "\u001b[16;11H\u001b[38;5;160m█"]
58-
[8.356753, "r", "112x25"]
59-
[8.440627, "o", "\u001b[20;50H\u001b[38;5;103m█"]
60-
[9.142212, "o", "\u001b[10;59H\u001b[38;5;156m█"]
61-
[9.844374, "o", "\u001b[12;53H\u001b[38;5;203m█"]

gallery/bouncing/bouncing.cast

Lines changed: 0 additions & 298 deletions
Large diffs are not rendered by default.

gallery/cutesaver/cutesaver.cast

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +0,0 @@
1-
{"version": 2, "width": 80, "height": 20, "timestamp": 1755955067, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
2-
[0.5282, "o", "You deserve something cute to look at. A mirror would help\r\nwith that, but I'm just a lowly command line application...\r\n\r\n"]
3-
[1.035741, "o", "ASCII to the rescue!\r\n"]
4-
[1.54337, "o", "\r\nYou're about to get put into an infinite loop of cuteness.\r\n"]
5-
[2.050747, "o", "\r\nLeave it running for as long as you like. To exit, just press\r\nCTRL+C at any time and you'll drop back to the shell.\r\n\r\n"]
6-
[4.07503, "o", "\u001b[40m"]
7-
[4.076052, "o", "\u001b[H\u001b[2J\u001b[3J"]
8-
[4.077046, "o", "\u001b[?25l"]
9-
[4.083151, "o", "\u001b[H\u001b[2J\u001b[3J"]
10-
[4.087104, "o", "\r\n #####\r\n ####### #**#!!###\r\n #**#!!!!## #****#!!!!#\r\n #****###!!!# #*****#!!!!#\r\n #*******#!!!# #******#!!!!#\r\n #*********#!###!*!*!*#!!!!!# --\r\n #!*!*!*!*!*!#!##########!!!!# /_\r\n ###########!##!!!!!!!!!!#!!!# //__\r\n ###!!!!!!!!!!!#!!!!!!!!!!!!!#!!!####/// \\\r\n \\ ##!#!!!!!!!!!!!#!!!!!!!!!!!!!!!#!!!!!!!#\r\n _\\ ##!!#!!!!!!!!!!!#!!!!!!!!!!!######!!!!!!!*#\r\n \\\\ ##!!#!!!!!!!!!!!!#!!!!####### #!!!!!!***#\r\n ___\\\\#!!!###################***** #...!!*****#\r\n / \\#!!!.# ***** # *** #....*******#\r\n #*....# *** # #.......*****#\r\n #**.....## ***** ##........!!****#\r\n #!........## *******#########......#...!!!!!*#\r\n #!...........#######.*****...............#.#..!!!!**#\r\n #*.....##.............#..#...............#...#.!!****#\r\n #*....#.#............#....#............##......!*****#\r\n #*.......##.......###......###........#.......!!!****#\r\n #*.........#######......!!....########.......!!!!!***#\r\n #!!!.................!!!!!!!!.............!!!*******#\r\n #!!!!............!!!!!!!!!!!!!!!!!!!!!!!!!!!******#\r\n #*******!!!!!!!!!!!!!!!!!!!!!!!!!!!!***!!!!*****#\r\n #******!!!!!!!!!!!!!!!!!!!!!!!!!********!!****#\r\n ##*****!!!!!!!!!!!!!!!!!!!!!#*************###\r\n ##****!!!!!!!!!!!!!!!!!!!!!###******####\r\n ####!!!!!!!!!!!!!!!!!!!!!!!!######!#\r\n #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*#\r\n #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!***##\r\n #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!******#\r\n #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*******#\r\n #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*****#\r\n #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!**#\r\n #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!##\r\n #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*##\r\n #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!***#\r\n #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!####!!!!!!****##\r\n #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!###****##!!!!******##\r\n #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!##**!!*****#!!!********#\r\n #!!!!!!!!#!!!!!!!!!!!#!!!!!!!#***!!!!***!!!!**********#\r\n #!!!!!!!!!!#!!!!!!!!!#!!!!!!!#****!!!!!*!!!!!!!!!!*****#\r\n #!!!!!!!!!!!#!!!!!!!#!!!!!!!#*!!***!!!!!!!!!!!!!!!!!***#\r\n #!!!!!!!!!!!!#!!!!!!#!!!!!!#*!!!!!*!!!!!!!!!!!!!!!*****#\r\n #!!!!!!!!!!!!#!!!!!!#!!!!!#***!!!!!!!!!!!!!!!!!********#\r\n #!!!!!!!!!!!!!#!!!!!!#!!!!!#****!!!!!!!!!!!!!!**********#\r\n #!!!!!!!!!!!!!#!!!!!!#!!!!!#*****!!!!!!!!!!!!!!*********#\r\n #!!!!!!!!!!!!!#!!!!!!#!!!!!#***!!!!!!!!!!!!!!!!!********##\r\n ##!!!!!!!!!!!!!#!!!!!!#!!!!!#*!!!!!!!!!!!!!!!!!!!!!*****#!*##\r\n #!#!!!!!!!!######!!!!!!#!!!!!#**!!!!!!!!!!#########!!!!*#!!**##\r\n #!#!#!!!!!!#!!!!!!!!!!!!#!!!!!#***!!!!!####******!!!#######!!**#\r\n #!#!!##!!!!#!!!!!!!!!!!############*!!!#********!!!!!!!!!!!!!!!**#\r\n #!#!!#!#!!#!!!#!!!!!!!#!!!!!!!!!!!!!!!#***********!!!!!!!!!!!!!!!#\r\n #!#!!!#!#!#!!#!!!!!!!#!!!!#!!!!#!!!!!#**********!!!!!!!!!!!!!!!**#\r\n #!!#!!!#!##!!#!!!!!!#!!!!#!!!!#!!!!!!#************!!!!!!!!!!****#\r\n ######### ##########!!!!#!!!!#!!!!!!#**********!!!!!!!!!!!!***#\r\n #################************!!!!!!!!!!**#\r\n #**********!!!!!#########\r\n ###############"]

0 commit comments

Comments
 (0)