diff options
| author | David Bremner <david@tethera.net> | 2021-02-14 09:23:44 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-03-27 09:26:14 -0300 |
| commit | e81dc2072f22996a07e82b9b9b2eac826410e5a7 (patch) | |
| tree | 1900a4bf8abba9de2d060a974dbb8f2fdd4aae39 /test/test-lib.sh | |
| parent | 863b2431853385441f9fcbc22b9ff4e963091440 (diff) | |
lib/config: set defaults for user full name
This just copies code from from the CLI into the library. New test
infrastructure is needed because apparently we have never tested this
code path.
Diffstat (limited to 'test/test-lib.sh')
| -rw-r--r-- | test/test-lib.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh index fc176af8..fa2e401e 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -694,6 +694,13 @@ notmuch_built_with_sanitize () sed 's/^built_with[.]\(.*\)=.*$/built_with.\1=something/' } +notmuch_passwd_sanitize () +{ + local user=$(id -un) + local full_name=$(getent passwd $user | cut -d: -f 5 | cut -d, -f1) + sed "s/$full_name/USER_FULL_NAME/" +} + notmuch_config_sanitize () { notmuch_dir_sanitize | notmuch_built_with_sanitize |
