AshlinHarris / Spinners.jl

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

Rewrite tests for the \@spinner macro #8

Closed AshlinHarris closed 1 year ago

AshlinHarris commented 1 year ago

The different test results between systems is probably due to variations in the time between the shell call and the appearance of the first character. I don't think imprecision in the length of sleep(n) is significant, but I've switched to usleep to be sure.

I didn't want to write regular expressions for this...

AshlinHarris commented 1 year ago

occursin()

AshlinHarris commented 1 year ago

I rewrote the tests for regular expressions.

There was an issue with the spinner process occasionally printing after cleanup ended. I added a flush of stdout just before the spinner is overwritten, but that didn't resolve the issue. I then added a priming step to the spinner process loop so that I could combine both internal print statements. Now, the spinner process should only terminate during sleep.

AshlinHarris commented 1 year ago

2e11234481988848f7388cab5d7f726939d6db9f