paleofetch
paleofetch copied to clipboard
Implement Testing
I think that this project is big enough now that we may want to add some testing, but I'm not sure exactly what that'd look like, especially since many things in paleofetch are dependent on hardware. And I'll be the first to admit that I'm not sure how best to write tests for a C project.
I definitely think that passing the valgrind-smell-test should be part of test, for any number of situations, including:
- Plainly running
paleofetch
- Running
paleofetch --recache
- Running
paleofetch
when reading from cache - Running
SHELL="" paleofetch
(or any situation causing a value to be empty) - Repeating all those for when there is no X server running
Here's my result. #25
While paleofetch
isn't exactly mission-critical, it'd be cool if we could throw AFL at it to find any weird edge cases. A solid step in the right direction there might be to extract the various paths we fopen()
to a central location; that'd make it a lot easier to pass potentially bug-inducing data in.
I'm not familiar with AFL, I'll try and take a look at it later today or over the weekend.