From: Felipe Contreras <felipe.contreras@gmail.com>
To: notmuch@notmuchmail.org
Cc: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Subject: [PATCH 12/13] test: trivial style cleanups
Date: Sat, 1 May 2021 06:54:21 -0500 [thread overview]
Message-ID: <20210501115422.483314-13-felipe.contreras@gmail.com> (raw)
In-Reply-To: <20210501115422.483314-1-felipe.contreras@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
test/T000-basic.sh | 2 +-
test/T070-insert.sh | 2 +-
| 10 +++++-----
test/export-dirs.sh | 2 +-
test/test-lib.sh | 8 ++++----
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/test/T000-basic.sh b/test/T000-basic.sh
index 7fbdcfa3..a2f4d93f 100755
--- a/test/T000-basic.sh
+++ b/test/T000-basic.sh
@@ -33,7 +33,7 @@ test_begin_subtest 'failure to clean up causes the test to fail'
test_expect_code 2 'test_when_finished "(exit 2)"'
EXPECTED=$NOTMUCH_SRCDIR/test/test.expected-output
-suppress_diff_date() {
+suppress_diff_date () {
sed -e 's/\(.*\-\-\- test-verbose\.4\.\expected\).*/\1/' \
-e 's/\(.*\+\+\+ test-verbose\.4\.\output\).*/\1/'
}
diff --git a/test/T070-insert.sh b/test/T070-insert.sh
index b37a9b67..208deb1c 100755
--- a/test/T070-insert.sh
+++ b/test/T070-insert.sh
@@ -15,7 +15,7 @@ notmuch new > /dev/null
# They happen to be in the mail directory already but that is okay
# since we do not call notmuch new hereafter.
-gen_insert_msg() {
+gen_insert_msg () {
generate_message \
"[subject]=\"insert-subject\"" \
"[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" \
--git a/test/T590-thread-breakage.sh b/test/T590-thread-breakage.sh
index aeb82cf4..92a70e3e 100755
--- a/test/T590-thread-breakage.sh
+++ b/test/T590-thread-breakage.sh
@@ -21,7 +21,7 @@ test_description='thread breakage during reindexing'
. $(dirname "$0")/test-lib.sh || exit 1
-message_a() {
+message_a () {
mkdir -p ${MAIL_DIR}/cur
cat > ${MAIL_DIR}/cur/a <<EOF
Subject: First message
@@ -35,7 +35,7 @@ Apple
EOF
}
-message_b() {
+message_b () {
mkdir -p ${MAIL_DIR}/cur
cat > ${MAIL_DIR}/cur/b <<EOF
Subject: Second message
@@ -52,19 +52,19 @@ EOF
}
-test_content_count() {
+test_content_count () {
test_begin_subtest "${3:-looking for $2 instance of '$1'}"
count=$(notmuch count --output=threads "$1")
test_expect_equal "$count" "$2"
}
-test_thread_count() {
+test_thread_count () {
test_begin_subtest "${2:-Expecting $1 thread(s)}"
count=$(notmuch count --output=threads)
test_expect_equal "$count" "$1"
}
-test_ghost_count() {
+test_ghost_count () {
test_begin_subtest "${2:-Expecting $1 ghosts(s)}"
ghosts=$($NOTMUCH_BUILDDIR/test/ghost-report ${MAIL_DIR}/.notmuch/xapian)
test_expect_equal "$ghosts" "$1"
diff --git a/test/export-dirs.sh b/test/export-dirs.sh
index 0578b1e5..844ee682 100644
--- a/test/export-dirs.sh
+++ b/test/export-dirs.sh
@@ -9,7 +9,7 @@ if [[ -z "${NOTMUCH_SRCDIR}" ]]; then
export NOTMUCH_SRCDIR="$(cd "$(dirname "$0")"/.. && pwd)"
fi
-find_builddir()
+find_builddir ()
{
local dir="$1"
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 7fdc0007..1b502456 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -585,7 +585,7 @@ notmuch_built_with_sanitize ()
sed 's/^built_with[.]\(.*\)=.*$/built_with.\1=something/'
}
-notmuch_passwd_sanitize()
+notmuch_passwd_sanitize ()
{
${NOTMUCH_PYTHON} -c'
import os, sys, pwd, socket
@@ -867,7 +867,7 @@ test_must_fail () {
# - cmp's output is not nearly as easy to read as diff -u
# - not all diff versions understand "-u"
-test_cmp() {
+test_cmp () {
$GIT_TEST_CMP "$@"
}
@@ -921,14 +921,14 @@ test_done () {
fi
}
-test_python() {
+test_python () {
# Note: if there is need to print debug information from python program,
# use stdout = os.fdopen(6, 'w') or stderr = os.fdopen(7, 'w')
PYTHONPATH="$NOTMUCH_SRCDIR/bindings/python${PYTHONPATH:+:$PYTHONPATH}" \
$NOTMUCH_PYTHON -B - > OUTPUT
}
-test_ruby() {
+test_ruby () {
MAIL_DIR=$MAIL_DIR $NOTMUCH_RUBY -I "$NOTMUCH_BUILDDIR/bindings/ruby"> OUTPUT
}
--
2.31.0
next prev parent reply other threads:[~2021-05-01 11:55 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-01 11:54 [PATCH 00/13] test: several fixes and improvements Felipe Contreras
2021-05-01 11:54 ` [PATCH 01/13] test: fix passwd_sanitize() Felipe Contreras
2021-05-01 20:01 ` Tomi Ollila
2021-05-01 11:54 ` [PATCH 02/13] test: unset NAME environment variable Felipe Contreras
2021-05-01 20:01 ` Tomi Ollila
2021-05-01 11:54 ` [PATCH 03/13] test: remove USER_FULL_NAME when not present Felipe Contreras
2021-05-01 20:13 ` Tomi Ollila
2021-05-01 11:54 ` [PATCH 04/13] test: use correct fqdn in passwd_sanitize() Felipe Contreras
2021-05-01 20:14 ` Tomi Ollila
2021-05-01 11:54 ` [PATCH 05/13] test: fix wrong SKIP messages Felipe Contreras
2021-05-01 20:18 ` Tomi Ollila
2021-05-01 11:54 ` [PATCH 06/13] test: add prereqs check in test_emacs_expect_t Felipe Contreras
2021-05-01 20:18 ` Tomi Ollila
2021-05-01 11:54 ` [PATCH 07/13] test: add external prereqs to many emacs tests Felipe Contreras
2021-05-01 20:19 ` Tomi Ollila
2021-05-01 11:54 ` [PATCH 08/13] test: split emacs functionality to its own file Felipe Contreras
2021-05-01 20:28 ` Tomi Ollila
2021-05-01 11:54 ` [PATCH 09/13] test: emacs: simplify missing dependencies check Felipe Contreras
2021-05-01 20:20 ` Tomi Ollila
2021-05-01 11:54 ` [PATCH 10/13] test: emacs: check for configured emacs Felipe Contreras
2021-05-01 20:20 ` Tomi Ollila
2021-05-01 11:54 ` [PATCH 11/13] test: emacs: fix a couple of shellcheck complaints Felipe Contreras
2021-05-01 20:21 ` Tomi Ollila
2021-05-01 11:54 ` Felipe Contreras [this message]
2021-05-01 20:28 ` [PATCH 12/13] test: trivial style cleanups Tomi Ollila
2021-05-01 11:54 ` [PATCH 13/13] test: more style fixes Felipe Contreras
2021-05-01 20:29 ` Tomi Ollila
2021-05-02 0:36 ` [PATCH 00/13] test: several fixes and improvements David Bremner
2021-05-02 5:08 ` Tomi Ollila
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210501115422.483314-13-felipe.contreras@gmail.com \
--to=felipe.contreras@gmail.com \
--cc=dkg@fifthhorseman.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).