diff options
author | Sven Strickroth <email@cs-ware.de> | 2020-09-09 12:26:34 +0200 |
---|---|---|
committer | Sven Strickroth <email@cs-ware.de> | 2020-09-09 13:22:38 +0200 |
commit | 36cf1db281c24d0a2fee1af3a7a80adbd263e1cb (patch) | |
tree | ffcab3d41448af0e3c39420c1e459a09c59c7e82 /tests | |
parent | 86d04918c0a8f405ccb0b86b7ff8419dfb7a0bd7 (diff) | |
download | libgit2-36cf1db281c24d0a2fee1af3a7a80adbd263e1cb.tar.gz |
Support empty values for git_config_get_mapped and git_config_lookup_map_value
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/config/read.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/config/read.c b/tests/config/read.c index d28d65c01..1bfd85e7e 100644 --- a/tests/config/read.c +++ b/tests/config/read.c @@ -955,11 +955,13 @@ void test_config_read__get_mapped(void) cl_git_mkfile("./testconfig", "[header]\n key1 = 1\n key2 = true\n key3\n key4 = always\n key5 = false\n key6 = 0\n key7 = never\n"); cl_git_pass(git_config_open_ondisk(&cfg, "./testconfig")); - // check aprsing bool and string + // check parsing bool and string cl_git_pass(git_config_get_mapped(&val, cfg, "header.key1", _test_map1, ARRAY_SIZE(_test_map1))); cl_assert_equal_i(val, MAP_TRUE); cl_git_pass(git_config_get_mapped(&val, cfg, "header.key2", _test_map1, ARRAY_SIZE(_test_map1))); cl_assert_equal_i(val, MAP_TRUE); + cl_git_pass(git_config_get_mapped(&val, cfg, "header.key3", _test_map1, ARRAY_SIZE(_test_map1))); + cl_assert_equal_i(val, MAP_TRUE); cl_git_pass(git_config_get_mapped(&val, cfg, "header.key4", _test_map1, ARRAY_SIZE(_test_map1))); cl_assert_equal_i(val, MAP_ALWAYS); |