From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0r.migadu.com with LMTPS id CMzgMZVBjWDkYQEALuJCtg (envelope-from ) for ; Sat, 01 May 2021 13:55:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id wJAiLZVBjWD/OQAA1q6Kng (envelope-from ) for ; Sat, 01 May 2021 11:55:01 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5591810DD0 for ; Sat, 1 May 2021 13:55:01 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 81866271EE; Sat, 1 May 2021 07:54:39 -0400 (EDT) Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by mail.notmuchmail.org (Postfix) with ESMTPS id 66735271D4 for ; Sat, 1 May 2021 07:54:31 -0400 (EDT) Received: by mail-ot1-x32d.google.com with SMTP id 103-20020a9d0d700000b02902a5baf33f37so446074oti.9 for ; Sat, 01 May 2021 04:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/3ggvwbOlzX7Vn3qTE/9+uxD33H1b3+pG7+EY+jsdB0=; b=fb7AGWt5NpmCPMy6vJN43p9FT5MOeSVianEkqGf1t4CXAL0InlBJiD/ZqMPCQx7zIR dblgro26t5+uz9HYJRNjdxGiU5gWQd2iddjBuLQSV6b8XogK9j285+U9MwbKC6niTrO3 HrHkvwJSniQ1fL1MiwgAr/h/g6FACgy7m+2AuJdi429j9t7IUloXx/nyqdRDSg0f+tsU HIIhL+RW5E3/+hgGprT4XZoOPpjLGkqqcPzffEFo5darZ/BVu1LUbVl9Dc+pNnxPab9y Hz6SMRFZhnDgN8dplRcg1ijEewAELwcrG1n3vVlleac/KrMzmd2dcObXdAWpqUQFCIGC lEPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/3ggvwbOlzX7Vn3qTE/9+uxD33H1b3+pG7+EY+jsdB0=; b=kjgZygkUk6QIXsaJEDi9p7jfmNjLSWlzjXV2JnKwP2ikot0/1pPI/dP9uTjy7Sz4Ye x0NqXI7JQSvhyHvMHS0YbkhlFsWMoAElnZfH8Mwv/Hn/4smGJSddCEiuZXOOJW0si+rp Q57BqmQnpVRuBqxzEPDanhp0V/0Q/QeyfBaPbtqk42wxm6tTK45525s1hcMgTENlN8Fc naENC9OHL1IeLW3Vu+4MGcEfz6/bDOA+DB3d4Zk3rrV3iQPKC199FoHnkyfF1yLvI1D7 5zpLIE4F+dWVVowU/anY7AxFpqkV7VDEX7gPcZVRe/tlrdJnL9cZ4v9fXR60cKdtJxwm tznA== X-Gm-Message-State: AOAM533HEhHMhD9RQojPKKIQwSBKZ+YWbTBaTjq7DWuekiwA1on5YdTV JJ5Nwf1heOfOMS7tZ+askFMa2CEcbq/dZA== X-Google-Smtp-Source: ABdhPJwYHokHTtselSC9HqkRLtwugW+YxlNhvS9q+IDg86qsuNUpgaY735TIZBGqrALyctZelImXFg== X-Received: by 2002:a9d:4f03:: with SMTP id d3mr6872412otl.361.1619870069486; Sat, 01 May 2021 04:54:29 -0700 (PDT) Received: from localhost ([2806:2f0:4060:638f:a2c5:89ff:fe0c:1151]) by smtp.gmail.com with ESMTPSA id e16sm1140042oiw.0.2021.05.01.04.54.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 May 2021 04:54:28 -0700 (PDT) From: Felipe Contreras To: notmuch@notmuchmail.org Subject: [PATCH 03/13] test: remove USER_FULL_NAME when not present Date: Sat, 1 May 2021 06:54:12 -0500 Message-Id: <20210501115422.483314-4-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210501115422.483314-1-felipe.contreras@gmail.com> References: <20210501115422.483314-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Message-ID-Hash: BAXEADWJ4RBCDZ3XURO6UYA6U4FNUSPH X-Message-ID-Hash: BAXEADWJ4RBCDZ3XURO6UYA6U4FNUSPH X-MailFrom: felipe.contreras@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Daniel Kahn Gillmor X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619870101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=cV5SLa/lbi2vb7MijnWGTluKCkAgxV8CUfTP1RquWhE=; b=kUW4D0Qx4H6qNoTZvZTrjFUST7guNGn0feLNWiMZpTEybZnsTybd5QX4MOKb94D5DovypG mIWGH8K12vD0OPBMuwb1bXbfXRmLyWJnuyEnZgNraWVpaAwOQytV0YMcCOFxpcF3FscD0a xyxUCPeWNs11KQA7f5PCX/KLh0OVeSbjifzEBQI1D6NEzmA55uQEvN3VEFnynPetn2ouNJ Am7RYdWXQGS1+HU7pPrdhHmldEUn2qQEk2hY6bP2W7Y1JU8SWesmkwBiN5spFi6+A4s1b+ T0VA6gzCR0xNox8spSnxqKOHkyVFD1RTVeFKgsQ1h3MRK0C3UzmZdAluXDQKew== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619870101; a=rsa-sha256; cv=none; b=avPyLlV8hdK1f871FPM3oY7azqGhX5fk0UsJkrFjVhGigjbsJjEYavVRGz7uIlVY8mm4ei QIG/i48sky3ccJrUMvdbPXG+9/Lx4eOmOks4HSiHwpFJEesJoy3TgwLJN6dUtOgIvjfIhE 4ZjAr8RQuOh4dPwk5bzlTaQNfA5dyrhwVK4kSrtl6rsdhK/Hu3b6m0ozXxVUicYTVzfvkB EhjCd/FZAwNx+cjXC7uuWU5x1gL3adYquR1nqNvcrILGpWEw7QrygD57dGIQjGnM2SKzX+ 92NzCuKoEp6P16/kGmqvgUrGjpeMgNXCV7XRDg4RacrAaIJ2yeYWBmdwp4LVpw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=fb7AGWt5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.00 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=fb7AGWt5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 5591810DD0 X-Spam-Score: -1.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: mgLuOpO48bQC If a full name is not configured, the output is empty. This is possibly not portable, but it's a start. Signed-off-by: Felipe Contreras --- test/T590-libconfig.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/T590-libconfig.sh b/test/T590-libconfig.sh index 51dd29c8..36d9af1b 100755 --- a/test/T590-libconfig.sh +++ b/test/T590-libconfig.sh @@ -5,6 +5,14 @@ test_description="library config API" add_email_corpus +get_name () { + if hash getent 2>/dev/null; then + getent passwd "$USER" | cut -d ':' -f 5 + else + echo "Foo Bar" + fi +} + cat < c_head #include #include @@ -402,6 +410,7 @@ NULL USER_FULL_NAME == stderr == EOF +test "$(get_name)" = "" && sed -e "s/USER_FULL_NAME//" -i EXPECTED unset MAILDIR test_expect_equal_file EXPECTED OUTPUT.clean @@ -744,6 +753,7 @@ NULL USER_FULL_NAME == stderr == EOF +test "$(get_name)" = "" && sed -e "s/USER_FULL_NAME//" -i EXPECTED test_expect_equal_file EXPECTED OUTPUT.clean backup_database -- 2.31.0