* [PATCH] test: move nonexistant directory to something under notmuch's control.
@ 2015-04-07 12:15 David Bremner
2015-04-07 12:30 ` Tomi Ollila
0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2015-04-07 12:15 UTC (permalink / raw)
To: notmuch
Apparently some systems actually have a directory called /nonexistent.
It's hard to fathom a good reason for that, but oh well. As long as we
don't create such a directory inside the notmuch source tree, the new
version should be more robust.
---
This should (hopefully) fix the current failures on travis
test/T560-lib-error.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh
index 828a44b..57abb28 100755
--- a/test/T560-lib-error.sh
+++ b/test/T560-lib-error.sh
@@ -43,13 +43,13 @@ int main (int argc, char** argv)
{
notmuch_database_t *db;
notmuch_status_t stat;
- stat = notmuch_database_open ("/nonexistent/foo", 0, 0);
+ stat = notmuch_database_open ("./nonexistent/foo", 0, 0);
}
EOF
cat <<'EOF' >EXPECTED
== stdout ==
== stderr ==
-Error opening database at /nonexistent/foo/.notmuch: No such file or directory
+Error opening database at ./nonexistent/foo/.notmuch: No such file or directory
EOF
test_expect_equal_file EXPECTED OUTPUT
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] test: move nonexistant directory to something under notmuch's control.
2015-04-07 12:15 [PATCH] test: move nonexistant directory to something under notmuch's control David Bremner
@ 2015-04-07 12:30 ` Tomi Ollila
2015-04-08 14:45 ` [PATCH 1/2] test: be consistent about spelling `nonexistent' David Bremner
0 siblings, 1 reply; 6+ messages in thread
From: Tomi Ollila @ 2015-04-07 12:30 UTC (permalink / raw)
To: David Bremner, notmuch
On Tue, Apr 07 2015, David Bremner <david@tethera.net> wrote:
> Apparently some systems actually have a directory called /nonexistent.
> It's hard to fathom a good reason for that, but oh well. As long as we
> don't create such a directory inside the notmuch source tree, the new
> version should be more robust.
2 things
although it makes this diff bigger should all /nonexistent... paths be
changed to ./nonexistent... -- it is a bit confusing having just this one
(or should there be another patch which converts rest of those)
Is 'nonexistant' there for a reason (as dictionaries find definitions for
that) or is it misspelling of 'nonexistent'. If there is no reason I'd like
to see it written 'nonexistent' uniformly :D
Tomi
> ---
> This should (hopefully) fix the current failures on travis
> test/T560-lib-error.sh | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh
> index 828a44b..57abb28 100755
> --- a/test/T560-lib-error.sh
> +++ b/test/T560-lib-error.sh
> @@ -43,13 +43,13 @@ int main (int argc, char** argv)
> {
> notmuch_database_t *db;
> notmuch_status_t stat;
> - stat = notmuch_database_open ("/nonexistent/foo", 0, 0);
> + stat = notmuch_database_open ("./nonexistent/foo", 0, 0);
> }
> EOF
> cat <<'EOF' >EXPECTED
> == stdout ==
> == stderr ==
> -Error opening database at /nonexistent/foo/.notmuch: No such file or directory
> +Error opening database at ./nonexistent/foo/.notmuch: No such file or directory
> EOF
> test_expect_equal_file EXPECTED OUTPUT
>
> --
> 2.1.4
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] test: be consistent about spelling `nonexistent'
2015-04-07 12:30 ` Tomi Ollila
@ 2015-04-08 14:45 ` David Bremner
2015-04-08 14:45 ` [PATCH 2/2] test: move nonexistent directory to something under notmuch's control David Bremner
2015-04-08 15:04 ` [PATCH 1/2] test: be consistent about spelling `nonexistent' Tomi Ollila
0 siblings, 2 replies; 6+ messages in thread
From: David Bremner @ 2015-04-08 14:45 UTC (permalink / raw)
To: Tomi Ollila, David Bremner, notmuch
Apparently most of the misspellings are my fault.
---
test/T360-symbol-hiding.sh | 2 +-
test/T560-lib-error.sh | 2 +-
test/symbol-test.cc | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/T360-symbol-hiding.sh b/test/T360-symbol-hiding.sh
index 8fc4bdf..d2b5d1f 100755
--- a/test/T360-symbol-hiding.sh
+++ b/test/T360-symbol-hiding.sh
@@ -16,7 +16,7 @@ run_test(){
}
output="A Xapian exception occurred opening database: Couldn't stat 'fakedb/.notmuch/xapian'
-caught No chert database found at path \`./nonexistant'"
+caught No chert database found at path \`./nonexistent'"
mkdir -p fakedb/.notmuch
diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh
index 828a44b..6947aa8 100755
--- a/test/T560-lib-error.sh
+++ b/test/T560-lib-error.sh
@@ -202,7 +202,7 @@ test_begin_subtest "Xapian exception finding message"
cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
{
notmuch_message_t *message = NULL;
- stat = notmuch_database_find_message (db, "id:nonexistant", &message);
+ stat = notmuch_database_find_message (db, "id:nonexistent", &message);
}
EOF
sed 's/^\(A Xapian exception [^:]*\):.*$/\1/' < OUTPUT > OUTPUT.clean
diff --git a/test/symbol-test.cc b/test/symbol-test.cc
index d979f83..f17ddc8 100644
--- a/test/symbol-test.cc
+++ b/test/symbol-test.cc
@@ -15,7 +15,7 @@ int main() {
}
try {
- (void) new Xapian::WritableDatabase("./nonexistant", Xapian::DB_OPEN);
+ (void) new Xapian::WritableDatabase("./nonexistent", Xapian::DB_OPEN);
} catch (const Xapian::Error &error) {
printf("caught %s\n", error.get_msg().c_str());
return 0;
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] test: move nonexistent directory to something under notmuch's control.
2015-04-08 14:45 ` [PATCH 1/2] test: be consistent about spelling `nonexistent' David Bremner
@ 2015-04-08 14:45 ` David Bremner
2015-04-08 15:04 ` [PATCH 1/2] test: be consistent about spelling `nonexistent' Tomi Ollila
1 sibling, 0 replies; 6+ messages in thread
From: David Bremner @ 2015-04-08 14:45 UTC (permalink / raw)
To: Tomi Ollila, David Bremner, notmuch
Apparently some systems actually have a directory called /nonexist[ae]nt.
It's hard to fathom a good reason for that, but oh well. As long as we
don't create such a directory inside the notmuch source tree, the new
version should be more robust.
---
test/T560-lib-error.sh | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh
index 6947aa8..c99b17e 100755
--- a/test/T560-lib-error.sh
+++ b/test/T560-lib-error.sh
@@ -43,13 +43,13 @@ int main (int argc, char** argv)
{
notmuch_database_t *db;
notmuch_status_t stat;
- stat = notmuch_database_open ("/nonexistent/foo", 0, 0);
+ stat = notmuch_database_open ("./nonexistent/foo", 0, 0);
}
EOF
cat <<'EOF' >EXPECTED
== stdout ==
== stderr ==
-Error opening database at /nonexistent/foo/.notmuch: No such file or directory
+Error opening database at ./nonexistent/foo/.notmuch: No such file or directory
EOF
test_expect_equal_file EXPECTED OUTPUT
@@ -78,13 +78,13 @@ int main (int argc, char** argv)
{
notmuch_database_t *db;
notmuch_status_t stat;
- stat = notmuch_database_create ("/nonexistent/foo", &db);
+ stat = notmuch_database_create ("./nonexistent/foo", &db);
}
EOF
cat <<'EOF' >EXPECTED
== stdout ==
== stderr ==
-Error: Cannot create database at /nonexistent/foo: No such file or directory.
+Error: Cannot create database at ./nonexistent/foo: No such file or directory.
EOF
test_expect_equal_file EXPECTED OUTPUT
@@ -125,7 +125,7 @@ int main (int argc, char** argv)
if (stat != NOTMUCH_STATUS_SUCCESS) {
fprintf (stderr, "error opening database: %d\n", stat);
}
- stat = notmuch_database_add_message (db, "/nonexistent", NULL);
+ stat = notmuch_database_add_message (db, "./nonexistent", NULL);
if (stat) {
char *status_string = notmuch_database_status_string (db);
if (status_string) fputs (status_string, stderr);
@@ -135,7 +135,7 @@ EOF
cat <<'EOF' >EXPECTED
== stdout ==
== stderr ==
-Error opening /nonexistent: No such file or directory
+Error opening ./nonexistent: No such file or directory
EOF
test_expect_equal_file EXPECTED OUTPUT
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] test: be consistent about spelling `nonexistent'
2015-04-08 14:45 ` [PATCH 1/2] test: be consistent about spelling `nonexistent' David Bremner
2015-04-08 14:45 ` [PATCH 2/2] test: move nonexistent directory to something under notmuch's control David Bremner
@ 2015-04-08 15:04 ` Tomi Ollila
2015-04-09 0:19 ` David Bremner
1 sibling, 1 reply; 6+ messages in thread
From: Tomi Ollila @ 2015-04-08 15:04 UTC (permalink / raw)
To: David Bremner, David Bremner, notmuch
On Wed, Apr 08 2015, David Bremner <david@tethera.net> wrote:
> Apparently most of the misspellings are my fault.
Series LGTM. Tests pass.
Tomi
> ---
> test/T360-symbol-hiding.sh | 2 +-
> test/T560-lib-error.sh | 2 +-
> test/symbol-test.cc | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/test/T360-symbol-hiding.sh b/test/T360-symbol-hiding.sh
> index 8fc4bdf..d2b5d1f 100755
> --- a/test/T360-symbol-hiding.sh
> +++ b/test/T360-symbol-hiding.sh
> @@ -16,7 +16,7 @@ run_test(){
> }
>
> output="A Xapian exception occurred opening database: Couldn't stat 'fakedb/.notmuch/xapian'
> -caught No chert database found at path \`./nonexistant'"
> +caught No chert database found at path \`./nonexistent'"
>
> mkdir -p fakedb/.notmuch
>
> diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh
> index 828a44b..6947aa8 100755
> --- a/test/T560-lib-error.sh
> +++ b/test/T560-lib-error.sh
> @@ -202,7 +202,7 @@ test_begin_subtest "Xapian exception finding message"
> cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR}
> {
> notmuch_message_t *message = NULL;
> - stat = notmuch_database_find_message (db, "id:nonexistant", &message);
> + stat = notmuch_database_find_message (db, "id:nonexistent", &message);
> }
> EOF
> sed 's/^\(A Xapian exception [^:]*\):.*$/\1/' < OUTPUT > OUTPUT.clean
> diff --git a/test/symbol-test.cc b/test/symbol-test.cc
> index d979f83..f17ddc8 100644
> --- a/test/symbol-test.cc
> +++ b/test/symbol-test.cc
> @@ -15,7 +15,7 @@ int main() {
> }
>
> try {
> - (void) new Xapian::WritableDatabase("./nonexistant", Xapian::DB_OPEN);
> + (void) new Xapian::WritableDatabase("./nonexistent", Xapian::DB_OPEN);
> } catch (const Xapian::Error &error) {
> printf("caught %s\n", error.get_msg().c_str());
> return 0;
> --
> 2.1.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] test: be consistent about spelling `nonexistent'
2015-04-08 15:04 ` [PATCH 1/2] test: be consistent about spelling `nonexistent' Tomi Ollila
@ 2015-04-09 0:19 ` David Bremner
0 siblings, 0 replies; 6+ messages in thread
From: David Bremner @ 2015-04-09 0:19 UTC (permalink / raw)
To: Tomi Ollila, notmuch
Tomi Ollila <tomi.ollila@iki.fi> writes:
> On Wed, Apr 08 2015, David Bremner <david@tethera.net> wrote:
>
>> Apparently most of the misspellings are my fault.
>
> Series LGTM. Tests pass.
>
> Tomi
pushed,
d
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-04-09 0:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-07 12:15 [PATCH] test: move nonexistant directory to something under notmuch's control David Bremner
2015-04-07 12:30 ` Tomi Ollila
2015-04-08 14:45 ` [PATCH 1/2] test: be consistent about spelling `nonexistent' David Bremner
2015-04-08 14:45 ` [PATCH 2/2] test: move nonexistent directory to something under notmuch's control David Bremner
2015-04-08 15:04 ` [PATCH 1/2] test: be consistent about spelling `nonexistent' Tomi Ollila
2015-04-09 0:19 ` David Bremner
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).