Test updates.
* ar/config-count-tests-updates:
t1300: add tests for missing keys
t1300: check stderr for "ignores pairs" tests
t1300: drop duplicate test
@ -98,6 +98,23 @@ test_expect_success 'subsections are not canonicalized by git-config' '
@@ -98,6 +98,23 @@ test_expect_success 'subsections are not canonicalized by git-config' '
test_cmp_config two section.SubSection.key
'
test_missing_key () {
local key="$1" &&
local title="$2" &&
test_expect_success "value for $title is not printed" '
test_must_fail git config "$key" >out 2>err &&
test_must_be_empty out &&
test_must_be_empty err
'
}
test_missing_key 'missingsection.missingkey' 'missing section and missing key'
test_missing_key 'missingsection.penguin' 'missing section and existing key'
test_missing_key 'section.missingkey' 'existing section and missing key'
test_missing_key 'section.MissingSubSection.missingkey' 'missing subsection and missing key'
test_missing_key 'section.SubSection.missingkey' 'existing subsection and missing key'
test_missing_key 'section.MissingSubSection.key' 'missing subsection and existing key'