Re: [PATCH v7 2/2] test-config: Add tests for the config_set API
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jul 9, 2014, 12:13 UTC
- Message-ID
- <vpq4myqd92r.fsf@anie.imag.fr>
- In-Reply-To
- <1404903454-10154-3-git-send-email-tanayabh@gmail.com>
Tanay Abhra <tanayabh@gmail.com> writes:
> +test_expect_success 'find value with misspelled key' ' > + test_must_fail check "my.fOo Bar.hi" "Value not found for \"my.fOo Bar.hi\"" > +'
Sorry, this is still not right. You're checking that either test-config OR test_cmp fails. You want to check both.
Basically, you can't use the "check" helper here. Your v5 was right for this test:
test_expect_success 'find value with misspelled key' ' echo "Value not found for \"my.fOo Bar.hi\"" >expect && test_must_fail test-config get_value "my.fOo Bar.hi" >actual && test_cmp expect actual '
-- Matthieu Moy http://www-verimag.imag.fr/~moy/