aboutsummaryrefslogtreecommitdiff
path: root/src/unit-test.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* src/unit-test.h: Make its output equal to aux/tests-lib.shEuAndreh2021-06-271-1/+1
|
* src/remembering-c.c: Add unit tests for get_profile_file()EuAndreh2021-06-271-0/+23
Those tests led me to handling the case where $XDG_DATA_HOME was set, but as an empty string. This is the equivalent of the "[ -z ".." ]" test. I also parameterized get_profile_file() to receive the stream where it should write to in case of failing to getenv("HOME"). Even though this makes the arguments of functions that print longer, it looks like an overall good pattern. It is the equivalent of every sh function printing to STDOUT, and let the caller decide if it should go to STDOUT or STDERR.