unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Cc: tomi.ollila@iki.fi
Subject: [PATCH 1/1] test: leave T\d\d\d- in variable $this_test and introduce $this_test_bare
Date: Mon, 13 Jan 2014 22:38:11 +0200	[thread overview]
Message-ID: <1389645491-7600-1-git-send-email-tomi.ollila@iki.fi> (raw)
In-Reply-To: <1389280739-31930-1-git-send-email-tomi.ollila@iki.fi>

Script `notmuch-test` expects the results file have T\d\d\d- part
intact so the results files (and some test output files) are now named
as such.

The T\d\d\d- part is dropped in new variable $this_test_bare which is used
in progress informational messages and when loading .el files in emacs
tests (whenever $this_test_bare.el exists).
---

This is an alternative to

id:1389641156-3365-1-git-send-email-tomi.ollila@iki.fi

I think this is better.

 test/test-lib.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 487075e..78af170 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -27,7 +27,7 @@ shopt -u xpg_echo
 
 this_test=${0##*/}
 this_test=${this_test%.sh}
-this_test=${this_test#T[0-9][0-9][0-9]-}
+this_test_bare=${this_test#T[0-9][0-9][0-9]-}
 
 # if --tee was passed, write the output not only to the terminal, but
 # additionally to the file test-results/$BASENAME.out, too.
@@ -196,7 +196,7 @@ print_test_description ()
 {
 	test -z "$test_description_printed" || return 0
 	echo
-	echo $this_test: "Testing ${test_description}"
+	echo $this_test_bare: "Testing ${test_description}"
 	test_description_printed=1
 }
 if [ -z "$NOTMUCH_TEST_QUIET" ]
@@ -1085,7 +1085,7 @@ test_emacs () {
 	test -z "$missing_dependencies" || return
 
 	if [ -z "$EMACS_SERVER" ]; then
-		emacs_tests="${this_test}.el"
+		emacs_tests="${this_test_bare}.el"
 		if [ -f "$TEST_DIRECTORY/$emacs_tests" ]; then
 			load_emacs_tests="--eval '(load \"$emacs_tests\")'"
 		else
-- 
1.8.4.2

  parent reply	other threads:[~2014-01-13 20:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 15:18 [PATCH 1/2] test: basic: drop 'ensure all available tests are run' Tomi Ollila
2014-01-09 15:18 ` [PATCH 2/2] test: renamed test scripts to format T\d\d\d-name.sh Tomi Ollila
2014-01-12  0:28 ` [PATCH 1/2] test: basic: drop 'ensure all available tests are run' David Bremner
2014-01-13 18:37 ` David Bremner
2014-01-13 19:25 ` [PATCH 1/1] test: check that expected results file exists when test script exits != 0 Tomi Ollila
2014-01-13 20:38 ` Tomi Ollila [this message]
2014-01-15  0:29   ` [PATCH 1/1] test: leave T\d\d\d- in variable $this_test and introduce $this_test_bare David Bremner
2014-01-15 18:58     ` [PATCH 1/1] test: check that expected results file exists when test script exits != 0 Tomi Ollila
2014-01-15 19:02     ` [PATCH v2] test: leave T\d\d\d- in variable $this_test and introduce $this_test_bare Tomi Ollila
2014-01-19  0:06       ` David Bremner

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=1389645491-7600-1-git-send-email-tomi.ollila@iki.fi \
    --to=tomi.ollila@iki.fi \
    --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).