AshlinHarris / Spinners.jl

Command line spinners in Julia with Unicode support
MIT License
14 stars 1 forks source link

Add back output tests #98

Closed AshlinHarris closed 1 year ago

AshlinHarris commented 1 year ago

For now, I don't see a simple way to generalize the current @spinner macro for multiple spinners. Instead, these might need to implemented separately. So, I'll add back direct output tests.

AshlinHarris commented 1 year ago

This test passes, so output is stable on my machine:

for i in 1:20
@test get_stdout(:( @spinner "abcdefg" sleep(1) )) == "\e[?25lb\b \bd\b \be\b \bf\b \bg\b \b\e[0J\e[?25h"
end

If precise output varies, regular expressions could be used. For more precision, usleep could be used instead of sleep.

AshlinHarris commented 1 year ago

How can I specify command line arguments to Julia in CI? I'd like to run julia --threads 1,1.

AshlinHarris commented 1 year ago

Currently, frames are overwritten with spaces and then rendered. Instead, they should just be overwritten by the following frame.

AshlinHarris commented 1 year ago

115