]> git.cworth.org Git - notmuch/blobdiff - test/test-lib.sh
test: unset NAME environment variable
[notmuch] / test / test-lib.sh
index 4c9f2a2103e32a18c2c14dc257669300ecbe4d6f..ae65336350913f26c564b1ba574c365f41cb3d57 100644 (file)
@@ -112,6 +112,7 @@ unset ALTERNATE_EDITOR
 
 # for reproducibility
 unset EMAIL
+unset NAME
 
 add_gnupg_home ()
 {
@@ -711,7 +712,12 @@ name = pw.pw_gecos.partition(",")[0]
 fqdn = socket.getfqdn()
 
 for l in sys.stdin:
-    l = l.replace(user, "USERNAME").replace(fqdn, "FQDN").replace(".(none)","").replace(name, "USER_FULL_NAME")
+    if user:
+        l = l.replace(user, "USERNAME")
+    if fqdn:
+        l = l.replace(fqdn, "FQDN").replace(".(none)","")
+    if name:
+        l = l.replace(name, "USER_FULL_NAME")
     sys.stdout.write(l)
 '
 }