[PATCH v4 01/13] test: rearrange the test corpus into subfolders

Jani Nikula jani at nikula.org
Sun Mar 9 14:40:22 PDT 2014


We will need this for improved folder search tests, but having some
folders should exercise our code paths better anyway.

Modify the relevant test accordingly to make it pass.
---
 test/T090-search-output.sh             | 168 ++++++++++++++++-----------------
 test/corpus/{cur => }/01:2,            |   0
 test/corpus/{cur => }/02:2,            |   0
 test/corpus/{cur => bar}/17:2,         |   0
 test/corpus/{cur => bar}/18:2,         |   0
 test/corpus/{cur => bar/baz}/05:2,     |   0
 test/corpus/{cur => bar/baz}/23:2,     |   0
 test/corpus/{cur => bar/baz}/24:2,     |   0
 test/corpus/{ => bar/baz}/cur/25:2,    |   0
 test/corpus/{ => bar/baz}/cur/26:2,    |   0
 test/corpus/{cur => bar/baz/new}/27:2, |   0
 test/corpus/{cur => bar/baz/new}/28:2, |   0
 test/corpus/{ => bar}/cur/19:2,        |   0
 test/corpus/{ => bar}/cur/20:2,        |   0
 test/corpus/{cur => bar/new}/21:2,     |   0
 test/corpus/{cur => bar/new}/22:2,     |   0
 test/corpus/{cur => foo}/06:2,         |   0
 test/corpus/{cur => foo/baz}/11:2,     |   0
 test/corpus/{cur => foo/baz}/12:2,     |   0
 test/corpus/{ => foo/baz}/cur/13:2,    |   0
 test/corpus/{ => foo/baz}/cur/14:2,    |   0
 test/corpus/{cur => foo/baz/new}/15:2, |   0
 test/corpus/{cur => foo/baz/new}/16:2, |   0
 test/corpus/{ => foo}/cur/07:2,        |   0
 test/corpus/{ => foo}/cur/08:2,        |   0
 test/corpus/{cur => foo/new}/03:2,     |   0
 test/corpus/{cur => foo/new}/09:2,     |   0
 test/corpus/{cur => foo/new}/10:2,     |   0
 test/corpus/{cur => new}/04:2,         |   0
 29 files changed, 84 insertions(+), 84 deletions(-)
 rename test/corpus/{cur => }/01:2, (100%)
 rename test/corpus/{cur => }/02:2, (100%)
 rename test/corpus/{cur => bar}/17:2, (100%)
 rename test/corpus/{cur => bar}/18:2, (100%)
 rename test/corpus/{cur => bar/baz}/05:2, (100%)
 rename test/corpus/{cur => bar/baz}/23:2, (100%)
 rename test/corpus/{cur => bar/baz}/24:2, (100%)
 rename test/corpus/{ => bar/baz}/cur/25:2, (100%)
 rename test/corpus/{ => bar/baz}/cur/26:2, (100%)
 rename test/corpus/{cur => bar/baz/new}/27:2, (100%)
 rename test/corpus/{cur => bar/baz/new}/28:2, (100%)
 rename test/corpus/{ => bar}/cur/19:2, (100%)
 rename test/corpus/{ => bar}/cur/20:2, (100%)
 rename test/corpus/{cur => bar/new}/21:2, (100%)
 rename test/corpus/{cur => bar/new}/22:2, (100%)
 rename test/corpus/{cur => foo}/06:2, (100%)
 rename test/corpus/{cur => foo/baz}/11:2, (100%)
 rename test/corpus/{cur => foo/baz}/12:2, (100%)
 rename test/corpus/{ => foo/baz}/cur/13:2, (100%)
 rename test/corpus/{ => foo/baz}/cur/14:2, (100%)
 rename test/corpus/{cur => foo/baz/new}/15:2, (100%)
 rename test/corpus/{cur => foo/baz/new}/16:2, (100%)
 rename test/corpus/{ => foo}/cur/07:2, (100%)
 rename test/corpus/{ => foo}/cur/08:2, (100%)
 rename test/corpus/{cur => foo/new}/03:2, (100%)
 rename test/corpus/{cur => foo/new}/09:2, (100%)
 rename test/corpus/{cur => foo/new}/10:2, (100%)
 rename test/corpus/{cur => new}/04:2, (100%)

diff --git a/test/T090-search-output.sh b/test/T090-search-output.sh
index 86544ac956a1..ef28c3d157aa 100755
--- a/test/T090-search-output.sh
+++ b/test/T090-search-output.sh
@@ -207,35 +207,35 @@ MAIL_DIR/cur/32:2,
 MAIL_DIR/cur/31:2,
 MAIL_DIR/cur/30:2,
 MAIL_DIR/cur/29:2,
-MAIL_DIR/cur/28:2,
-MAIL_DIR/cur/27:2,
-MAIL_DIR/cur/26:2,
-MAIL_DIR/cur/25:2,
-MAIL_DIR/cur/24:2,
-MAIL_DIR/cur/23:2,
-MAIL_DIR/cur/22:2,
-MAIL_DIR/cur/21:2,
-MAIL_DIR/cur/19:2,
-MAIL_DIR/cur/18:2,
+MAIL_DIR/bar/baz/new/28:2,
+MAIL_DIR/bar/baz/new/27:2,
+MAIL_DIR/bar/baz/cur/26:2,
+MAIL_DIR/bar/baz/cur/25:2,
+MAIL_DIR/bar/baz/24:2,
+MAIL_DIR/bar/baz/23:2,
+MAIL_DIR/bar/new/22:2,
+MAIL_DIR/bar/new/21:2,
+MAIL_DIR/bar/cur/19:2,
+MAIL_DIR/bar/18:2,
 MAIL_DIR/cur/51:2,
-MAIL_DIR/cur/20:2,
-MAIL_DIR/cur/17:2,
-MAIL_DIR/cur/16:2,
-MAIL_DIR/cur/15:2,
-MAIL_DIR/cur/14:2,
-MAIL_DIR/cur/13:2,
-MAIL_DIR/cur/12:2,
-MAIL_DIR/cur/11:2,
-MAIL_DIR/cur/10:2,
-MAIL_DIR/cur/09:2,
-MAIL_DIR/cur/08:2,
-MAIL_DIR/cur/06:2,
-MAIL_DIR/cur/05:2,
-MAIL_DIR/cur/04:2,
-MAIL_DIR/cur/03:2,
-MAIL_DIR/cur/07:2,
-MAIL_DIR/cur/02:2,
-MAIL_DIR/cur/01:2,
+MAIL_DIR/bar/cur/20:2,
+MAIL_DIR/bar/17:2,
+MAIL_DIR/foo/baz/new/16:2,
+MAIL_DIR/foo/baz/new/15:2,
+MAIL_DIR/foo/baz/cur/14:2,
+MAIL_DIR/foo/baz/cur/13:2,
+MAIL_DIR/foo/baz/12:2,
+MAIL_DIR/foo/baz/11:2,
+MAIL_DIR/foo/new/10:2,
+MAIL_DIR/foo/new/09:2,
+MAIL_DIR/foo/cur/08:2,
+MAIL_DIR/foo/06:2,
+MAIL_DIR/bar/baz/05:2,
+MAIL_DIR/new/04:2,
+MAIL_DIR/foo/new/03:2,
+MAIL_DIR/foo/cur/07:2,
+MAIL_DIR/02:2,
+MAIL_DIR/01:2,
 EOF
 test_expect_equal_file OUTPUT EXPECTED
 
@@ -266,34 +266,34 @@ MAIL_DIR/cur/32:2,
 MAIL_DIR/cur/31:2,
 MAIL_DIR/cur/30:2,
 MAIL_DIR/cur/29:2,
-MAIL_DIR/cur/28:2,
-MAIL_DIR/cur/27:2,
-MAIL_DIR/cur/26:2,
-MAIL_DIR/cur/25:2,
-MAIL_DIR/cur/24:2,
-MAIL_DIR/cur/23:2,
-MAIL_DIR/cur/22:2,
-MAIL_DIR/cur/21:2,
-MAIL_DIR/cur/19:2,
-MAIL_DIR/cur/18:2,
-MAIL_DIR/cur/20:2,
-MAIL_DIR/cur/17:2,
-MAIL_DIR/cur/16:2,
-MAIL_DIR/cur/15:2,
-MAIL_DIR/cur/14:2,
-MAIL_DIR/cur/13:2,
-MAIL_DIR/cur/12:2,
-MAIL_DIR/cur/11:2,
-MAIL_DIR/cur/10:2,
-MAIL_DIR/cur/09:2,
-MAIL_DIR/cur/08:2,
-MAIL_DIR/cur/06:2,
-MAIL_DIR/cur/05:2,
-MAIL_DIR/cur/04:2,
-MAIL_DIR/cur/03:2,
-MAIL_DIR/cur/07:2,
-MAIL_DIR/cur/02:2,
-MAIL_DIR/cur/01:2,
+MAIL_DIR/bar/baz/new/28:2,
+MAIL_DIR/bar/baz/new/27:2,
+MAIL_DIR/bar/baz/cur/26:2,
+MAIL_DIR/bar/baz/cur/25:2,
+MAIL_DIR/bar/baz/24:2,
+MAIL_DIR/bar/baz/23:2,
+MAIL_DIR/bar/new/22:2,
+MAIL_DIR/bar/new/21:2,
+MAIL_DIR/bar/cur/19:2,
+MAIL_DIR/bar/18:2,
+MAIL_DIR/bar/cur/20:2,
+MAIL_DIR/bar/17:2,
+MAIL_DIR/foo/baz/new/16:2,
+MAIL_DIR/foo/baz/new/15:2,
+MAIL_DIR/foo/baz/cur/14:2,
+MAIL_DIR/foo/baz/cur/13:2,
+MAIL_DIR/foo/baz/12:2,
+MAIL_DIR/foo/baz/11:2,
+MAIL_DIR/foo/new/10:2,
+MAIL_DIR/foo/new/09:2,
+MAIL_DIR/foo/cur/08:2,
+MAIL_DIR/foo/06:2,
+MAIL_DIR/bar/baz/05:2,
+MAIL_DIR/new/04:2,
+MAIL_DIR/foo/new/03:2,
+MAIL_DIR/foo/cur/07:2,
+MAIL_DIR/02:2,
+MAIL_DIR/01:2,
 EOF
 test_expect_equal_file OUTPUT EXPECTED
 
@@ -324,35 +324,35 @@ cat <<EOF >EXPECTED
 "MAIL_DIR/cur/31:2,",
 "MAIL_DIR/cur/30:2,",
 "MAIL_DIR/cur/29:2,",
-"MAIL_DIR/cur/28:2,",
-"MAIL_DIR/cur/27:2,",
-"MAIL_DIR/cur/26:2,",
-"MAIL_DIR/cur/25:2,",
-"MAIL_DIR/cur/24:2,",
-"MAIL_DIR/cur/23:2,",
-"MAIL_DIR/cur/22:2,",
-"MAIL_DIR/cur/21:2,",
-"MAIL_DIR/cur/19:2,",
-"MAIL_DIR/cur/18:2,",
+"MAIL_DIR/bar/baz/new/28:2,",
+"MAIL_DIR/bar/baz/new/27:2,",
+"MAIL_DIR/bar/baz/cur/26:2,",
+"MAIL_DIR/bar/baz/cur/25:2,",
+"MAIL_DIR/bar/baz/24:2,",
+"MAIL_DIR/bar/baz/23:2,",
+"MAIL_DIR/bar/new/22:2,",
+"MAIL_DIR/bar/new/21:2,",
+"MAIL_DIR/bar/cur/19:2,",
+"MAIL_DIR/bar/18:2,",
 "MAIL_DIR/cur/51:2,",
-"MAIL_DIR/cur/20:2,",
-"MAIL_DIR/cur/17:2,",
-"MAIL_DIR/cur/16:2,",
-"MAIL_DIR/cur/15:2,",
-"MAIL_DIR/cur/14:2,",
-"MAIL_DIR/cur/13:2,",
-"MAIL_DIR/cur/12:2,",
-"MAIL_DIR/cur/11:2,",
-"MAIL_DIR/cur/10:2,",
-"MAIL_DIR/cur/09:2,",
-"MAIL_DIR/cur/08:2,",
-"MAIL_DIR/cur/06:2,",
-"MAIL_DIR/cur/05:2,",
-"MAIL_DIR/cur/04:2,",
-"MAIL_DIR/cur/03:2,",
-"MAIL_DIR/cur/07:2,",
-"MAIL_DIR/cur/02:2,",
-"MAIL_DIR/cur/01:2,"]
+"MAIL_DIR/bar/cur/20:2,",
+"MAIL_DIR/bar/17:2,",
+"MAIL_DIR/foo/baz/new/16:2,",
+"MAIL_DIR/foo/baz/new/15:2,",
+"MAIL_DIR/foo/baz/cur/14:2,",
+"MAIL_DIR/foo/baz/cur/13:2,",
+"MAIL_DIR/foo/baz/12:2,",
+"MAIL_DIR/foo/baz/11:2,",
+"MAIL_DIR/foo/new/10:2,",
+"MAIL_DIR/foo/new/09:2,",
+"MAIL_DIR/foo/cur/08:2,",
+"MAIL_DIR/foo/06:2,",
+"MAIL_DIR/bar/baz/05:2,",
+"MAIL_DIR/new/04:2,",
+"MAIL_DIR/foo/new/03:2,",
+"MAIL_DIR/foo/cur/07:2,",
+"MAIL_DIR/02:2,",
+"MAIL_DIR/01:2,"]
 EOF
 test_expect_equal_file OUTPUT EXPECTED
 
diff --git a/test/corpus/cur/01:2, b/test/corpus/01:2,
similarity index 100%
rename from test/corpus/cur/01:2,
rename to test/corpus/01:2,
diff --git a/test/corpus/cur/02:2, b/test/corpus/02:2,
similarity index 100%
rename from test/corpus/cur/02:2,
rename to test/corpus/02:2,
diff --git a/test/corpus/cur/17:2, b/test/corpus/bar/17:2,
similarity index 100%
rename from test/corpus/cur/17:2,
rename to test/corpus/bar/17:2,
diff --git a/test/corpus/cur/18:2, b/test/corpus/bar/18:2,
similarity index 100%
rename from test/corpus/cur/18:2,
rename to test/corpus/bar/18:2,
diff --git a/test/corpus/cur/05:2, b/test/corpus/bar/baz/05:2,
similarity index 100%
rename from test/corpus/cur/05:2,
rename to test/corpus/bar/baz/05:2,
diff --git a/test/corpus/cur/23:2, b/test/corpus/bar/baz/23:2,
similarity index 100%
rename from test/corpus/cur/23:2,
rename to test/corpus/bar/baz/23:2,
diff --git a/test/corpus/cur/24:2, b/test/corpus/bar/baz/24:2,
similarity index 100%
rename from test/corpus/cur/24:2,
rename to test/corpus/bar/baz/24:2,
diff --git a/test/corpus/cur/25:2, b/test/corpus/bar/baz/cur/25:2,
similarity index 100%
rename from test/corpus/cur/25:2,
rename to test/corpus/bar/baz/cur/25:2,
diff --git a/test/corpus/cur/26:2, b/test/corpus/bar/baz/cur/26:2,
similarity index 100%
rename from test/corpus/cur/26:2,
rename to test/corpus/bar/baz/cur/26:2,
diff --git a/test/corpus/cur/27:2, b/test/corpus/bar/baz/new/27:2,
similarity index 100%
rename from test/corpus/cur/27:2,
rename to test/corpus/bar/baz/new/27:2,
diff --git a/test/corpus/cur/28:2, b/test/corpus/bar/baz/new/28:2,
similarity index 100%
rename from test/corpus/cur/28:2,
rename to test/corpus/bar/baz/new/28:2,
diff --git a/test/corpus/cur/19:2, b/test/corpus/bar/cur/19:2,
similarity index 100%
rename from test/corpus/cur/19:2,
rename to test/corpus/bar/cur/19:2,
diff --git a/test/corpus/cur/20:2, b/test/corpus/bar/cur/20:2,
similarity index 100%
rename from test/corpus/cur/20:2,
rename to test/corpus/bar/cur/20:2,
diff --git a/test/corpus/cur/21:2, b/test/corpus/bar/new/21:2,
similarity index 100%
rename from test/corpus/cur/21:2,
rename to test/corpus/bar/new/21:2,
diff --git a/test/corpus/cur/22:2, b/test/corpus/bar/new/22:2,
similarity index 100%
rename from test/corpus/cur/22:2,
rename to test/corpus/bar/new/22:2,
diff --git a/test/corpus/cur/06:2, b/test/corpus/foo/06:2,
similarity index 100%
rename from test/corpus/cur/06:2,
rename to test/corpus/foo/06:2,
diff --git a/test/corpus/cur/11:2, b/test/corpus/foo/baz/11:2,
similarity index 100%
rename from test/corpus/cur/11:2,
rename to test/corpus/foo/baz/11:2,
diff --git a/test/corpus/cur/12:2, b/test/corpus/foo/baz/12:2,
similarity index 100%
rename from test/corpus/cur/12:2,
rename to test/corpus/foo/baz/12:2,
diff --git a/test/corpus/cur/13:2, b/test/corpus/foo/baz/cur/13:2,
similarity index 100%
rename from test/corpus/cur/13:2,
rename to test/corpus/foo/baz/cur/13:2,
diff --git a/test/corpus/cur/14:2, b/test/corpus/foo/baz/cur/14:2,
similarity index 100%
rename from test/corpus/cur/14:2,
rename to test/corpus/foo/baz/cur/14:2,
diff --git a/test/corpus/cur/15:2, b/test/corpus/foo/baz/new/15:2,
similarity index 100%
rename from test/corpus/cur/15:2,
rename to test/corpus/foo/baz/new/15:2,
diff --git a/test/corpus/cur/16:2, b/test/corpus/foo/baz/new/16:2,
similarity index 100%
rename from test/corpus/cur/16:2,
rename to test/corpus/foo/baz/new/16:2,
diff --git a/test/corpus/cur/07:2, b/test/corpus/foo/cur/07:2,
similarity index 100%
rename from test/corpus/cur/07:2,
rename to test/corpus/foo/cur/07:2,
diff --git a/test/corpus/cur/08:2, b/test/corpus/foo/cur/08:2,
similarity index 100%
rename from test/corpus/cur/08:2,
rename to test/corpus/foo/cur/08:2,
diff --git a/test/corpus/cur/03:2, b/test/corpus/foo/new/03:2,
similarity index 100%
rename from test/corpus/cur/03:2,
rename to test/corpus/foo/new/03:2,
diff --git a/test/corpus/cur/09:2, b/test/corpus/foo/new/09:2,
similarity index 100%
rename from test/corpus/cur/09:2,
rename to test/corpus/foo/new/09:2,
diff --git a/test/corpus/cur/10:2, b/test/corpus/foo/new/10:2,
similarity index 100%
rename from test/corpus/cur/10:2,
rename to test/corpus/foo/new/10:2,
diff --git a/test/corpus/cur/04:2, b/test/corpus/new/04:2,
similarity index 100%
rename from test/corpus/cur/04:2,
rename to test/corpus/new/04:2,
-- 
1.9.0



More information about the notmuch mailing list