git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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/
Previous: Tanay AbhraNext: Tanay Abhra
Message 13 of 14 in “git config cache & special querying api utilizing the cache”
  1. 0/3 git config cache & special querying api utilizing the cacheTanay Abhra, Jul 9, 2014
  2. 1/2 add `config_set` API for caching config-like filesTanay Abhra, Jul 9, 2014
  3. Matthieu MoyJul 9, 2014
  4. Tanay AbhraJul 9, 2014
  5. Matthieu MoyJul 9, 2014
  6. Junio C HamanoJul 9, 2014
  7. Junio C HamanoJul 9, 2014
  8. Matthieu MoyJul 10, 2014
  9. Junio C HamanoJul 10, 2014
  10. Tanay AbhraJul 9, 2014
  11. Matthieu MoyJul 10, 2014
  12. 2/2 test-config: Add tests for the config_set APITanay Abhra, Jul 9, 2014
  13. Matthieu MoyJul 9, 2014
  14. Tanay AbhraJul 9, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.