aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2016-03-22 07:54:45 -0300
committerDavid Bremner <david@tethera.net>2016-05-13 07:29:12 -0300
commit792bea5aff135107fd970f51f3ef8c65f68194de (patch)
treeb3df6cbce34542f2789d70c402c2194edcc6b18e /test
parentbbf6069252d31e6693ee99cce8bf4f9fab47e360 (diff)
lib/cli: add library API / CLI for compile time options
This is intentionally low tech; if we have more than two options it may make sense to build up what infrastructure is provided.
Diffstat (limited to 'test')
-rwxr-xr-xtest/T030-config.sh6
-rwxr-xr-xtest/T040-setup.sh6
-rw-r--r--test/test-lib.sh6
3 files changed, 14 insertions, 4 deletions
diff --git a/test/T030-config.sh b/test/T030-config.sh
index f404908a..437269ff 100755
--- a/test/T030-config.sh
+++ b/test/T030-config.sh
@@ -44,7 +44,7 @@ test_expect_equal "$(notmuch config get foo.nonexistent)" ""
test_begin_subtest "List all items"
notmuch config set database.path "/canonical/path"
-output=$(notmuch config list)
+output=$(notmuch config list | notmuch_built_with_sanitize)
test_expect_equal "$output" "\
database.path=/canonical/path
user.name=Notmuch Test Suite
@@ -56,7 +56,9 @@ search.exclude_tags=
maildir.synchronize_flags=true
crypto.gpg_path=gpg
foo.string=this is another string value
-foo.list=this;is another;list value;"
+foo.list=this;is another;list value;
+built_with.compact=something
+built_with.field_processor=something"
test_begin_subtest "Top level --config=FILE option"
cp "${NOTMUCH_CONFIG}" alt-config
diff --git a/test/T040-setup.sh b/test/T040-setup.sh
index cf0c00bc..be2f0dbd 100755
--- a/test/T040-setup.sh
+++ b/test/T040-setup.sh
@@ -19,7 +19,7 @@ another.suite@example.com
foo bar
baz
EOF
-output=$(notmuch --config=new-notmuch-config config list)
+output=$(notmuch --config=new-notmuch-config config list | notmuch_built_with_sanitize)
test_expect_equal "$output" "\
database.path=/path/to/maildir
user.name=Test Suite
@@ -29,6 +29,8 @@ new.tags=foo;bar;
new.ignore=
search.exclude_tags=baz;
maildir.synchronize_flags=true
-crypto.gpg_path=gpg"
+crypto.gpg_path=gpg
+built_with.compact=something
+built_with.field_processor=something"
test_done
diff --git a/test/test-lib.sh b/test/test-lib.sh
index ac04b15a..09f87319 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -733,6 +733,12 @@ notmuch_uuid_sanitize ()
{
sed 's/[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/UUID/g'
}
+
+notmuch_built_with_sanitize ()
+{
+ sed 's/^built_with[.]\(.*\)=.*$/built_with.\1=something/'
+}
+
# End of notmuch helper functions
# Use test_set_prereq to tell that a particular prerequisite is available.