aboutsummaryrefslogtreecommitdiff
path: root/doc/remembering.eo.5.in
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-27 10:42:57 -0300
committerEuAndreh <eu@euandre.org>2021-06-27 10:46:06 -0300
commit757c8963101a0bce5dbb5ad389acdcf7ceb2ecc4 (patch)
tree12e61b5eabb5be8634c506aeb37267041aa3390a /doc/remembering.eo.5.in
parentsrc/remembering-c.c: Add get_profile_file() (diff)
downloadremembering-757c8963101a0bce5dbb5ad389acdcf7ceb2ecc4.tar.gz
remembering-757c8963101a0bce5dbb5ad389acdcf7ceb2ecc4.tar.xz
src/remembering-c.c: Add unit tests for get_profile_file()
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.
Diffstat (limited to 'doc/remembering.eo.5.in')
0 files changed, 0 insertions, 0 deletions