Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id D99576DE0217 for ; Sat, 7 May 2016 09:03:05 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.601 X-Spam-Level: X-Spam-Status: No, score=0.601 tagged_above=-999 required=5 tests=[AWL=-0.051, SPF_NEUTRAL=0.652] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wprfQveglX6y for ; Sat, 7 May 2016 09:02:57 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id 856216DE00EB for ; Sat, 7 May 2016 09:02:57 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id C501F100063; Sat, 7 May 2016 19:02:51 +0300 (EEST) From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Subject: Re: [Patch v3 03/11] lib/cli: add library API / CLI for compile time options In-Reply-To: <1462065879-29860-4-git-send-email-david@tethera.net> References: <1462065879-29860-1-git-send-email-david@tethera.net> <1462065879-29860-4-git-send-email-david@tethera.net> User-Agent: Notmuch/0.22+9~gb26b5ad (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2016 16:03:06 -0000 On Sun, May 01 2016, David Bremner wrote: so far so good, (CXXLAGS does not need more mentioning ;) > diff --git a/test/T030-config.sh b/test/T030-config.sh > index f404908..a4e24c3 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_options_sanitize) 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 cf0c00b..be2f0db 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 ac04b15..09f8731 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/' > +} The above looks good. In this case I think this would work too sed '/^built_with/ s/=.*/=something/' hmm. simpler, but less educational ;) Tomi > + > # End of notmuch helper functions > > # Use test_set_prereq to tell that a particular prerequisite is available. > -- > 2.8.0.rc3