]> git.notmuchmail.org Git - notmuch/commitdiff
test/setup: ignore blank lines in generated config
authorDavid Bremner <david@tethera.net>
Sun, 20 Aug 2023 15:23:19 +0000 (12:23 -0300)
committerDavid Bremner <david@tethera.net>
Mon, 21 Aug 2023 22:30:54 +0000 (19:30 -0300)
The presense of the blank lines between sections depends on the
version of glib. Strip them before comparison.

test/T040-setup.sh
test/setup.expected-output/config-with-comments

index 10b29ec33f3a726f261feb5df98d58789643cf3e..39846d34b7f32f3912619bf49d30d90c4ab67f4d 100755 (executable)
@@ -21,7 +21,8 @@ baz
 EOF
 
 expected_dir=$NOTMUCH_SRCDIR/test/setup.expected-output
-test_expect_equal_file ${expected_dir}/config-with-comments new-notmuch-config
+sed '/^$/d' < new-notmuch-config > filtered-config
+test_expect_equal_file ${expected_dir}/config-with-comments filtered-config
 
 test_begin_subtest "setup consistent with config-set for single items"
 # note this relies on the config state from the previous test.
index d8397714874cbc4236422aa61bdda53f7e322205..d925acea352e41dd3133d4062cdf4ac025a075e8 100644 (file)
@@ -1,7 +1,6 @@
 # .notmuch-config - Configuration file for the notmuch mail system
 #
 # For more information about notmuch, see https://notmuchmail.org
-
 # Database configuration
 #
 # The only value supported here is 'path' which should be the top-level
@@ -12,7 +11,6 @@
 #
 [database]
 path=/path/to/maildir
-
 # User configuration
 #
 # Here is where you can let notmuch know how you would like to be
@@ -32,7 +30,6 @@ path=/path/to/maildir
 name=Test Suite
 primary_email=test.suite@example.com
 other_email=another.suite@example.com
-
 # Configuration for "notmuch new"
 #
 # The following options are supported here:
@@ -49,7 +46,6 @@ other_email=another.suite@example.com
 #
 [new]
 tags=foo;bar;
-
 # Search configuration
 #
 # The following option is supported here:
@@ -61,7 +57,6 @@ tags=foo;bar;
 #
 [search]
 exclude_tags=baz
-
 # Maildir compatibility configuration
 #
 # The following option is supported here: