3 test_description='test log with i18n features'
7 utf8_e=$(printf '\303\251')
8 latin1_e=$(printf '\351')
10 test_expect_success 'create commits in different encodings' '
18 git -c i18n.commitencoding=utf8 commit -F msg &&
25 git -c i18n.commitencoding=ISO-8859-1 commit -F msg
28 test_expect_success 'log --grep searches in log output encoding (utf8)' '
29 cat >expect <<-\EOF &&
33 git log --encoding=utf8 --format=%s --grep=$utf8_e >actual &&
34 test_cmp expect actual
37 test_expect_success 'log --grep searches in log output encoding (latin1)' '
38 cat >expect <<-\EOF &&
42 git log --encoding=ISO-8859-1 --format=%s --grep=$latin1_e >actual &&
43 test_cmp expect actual
46 test_expect_success 'log --grep does not find non-reencoded values (utf8)' '
48 git log --encoding=utf8 --format=%s --grep=$latin1_e >actual &&
49 test_cmp expect actual
52 test_expect_success 'log --grep does not find non-reencoded values (latin1)' '
54 git log --encoding=ISO-8859-1 --format=%s --grep=$utf8_e >actual &&
55 test_cmp expect actual