diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-04-06 23:38:29 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-04-06 23:38:29 +0300 |
commit | 06e9e726d463b413d45703b31881de4ed99b3417 (patch) | |
tree | a1cad3c86f333a19f1b4d4fc9123236ad122a1ef /t/t1308-config-set.sh | |
parent | 0a8c337394c208f584173d1c8c0dca600f9be1fe (diff) | |
parent | 9b4a655302aae41a35752acfb61da1b43b4c7ce7 (diff) |
Merge branch 'gc/config-parsing-cleanup'
Config API clean-up to reduce its dependence on static variables
* gc/config-parsing-cleanup:
config.c: rename "struct config_source cf"
config: report cached filenames in die_bad_number()
config.c: remove current_parsing_scope
config.c: remove current_config_kvi
config.c: plumb the_reader through callbacks
config.c: create config_reader and the_reader
config.c: don't assign to "cf_global" directly
config.c: plumb config_source through static fns
Diffstat (limited to 't/t1308-config-set.sh')
-rwxr-xr-x | t/t1308-config-set.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh index 7def7053e1..777648722c 100755 --- a/t/t1308-config-set.sh +++ b/t/t1308-config-set.sh @@ -161,6 +161,10 @@ test_expect_success 'find integer value for a key' ' check_config get_int lamb.chop 65 ' +test_expect_success 'parse integer value during iteration' ' + check_config git_config_int lamb.chop 65 +' + test_expect_success 'find string value for a key' ' check_config get_string case.baz hask && check_config expect_code 1 get_string case.ba "Value not found for \"case.ba\"" @@ -175,6 +179,11 @@ test_expect_success 'find integer if value is non parse-able' ' check_config expect_code 128 get_int lamb.head ' +test_expect_success 'non parse-able integer value during iteration' ' + check_config expect_code 128 git_config_int lamb.head 2>result && + grep "fatal: bad numeric config value .* in file \.git/config" result +' + test_expect_success 'find bool value for the entered key' ' check_config get_bool goat.head 1 && check_config get_bool goat.skin 0 && |