File: util.t

package info (click to toggle)
git-autofixup 0.004007-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 228 kB
  • sloc: perl: 1,876; sh: 58; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 678 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/perl

use strict;
use warnings FATAL => 'all';

use Test::More tests => 1;

require './t/util.pl';

sub test_git_config_env_vars_converts_multiple_pairs {
    my $name = "git_config_env_vars converts multiple pairs";
    my $git_config = {
        'diff.mnemonicPrefix' => 'true',
        'diff.external' => 'vimdiff',
    };
    my $got = Util::git_config_env_vars($git_config);
    my $want = {
        GIT_CONFIG_KEY_0 => 'diff.external',
        GIT_CONFIG_VALUE_0 => 'vimdiff',
        GIT_CONFIG_KEY_1 => 'diff.mnemonicPrefix',
        GIT_CONFIG_VALUE_1 => 'true',
    };
    is_deeply($got, $want, $name)
}
test_git_config_env_vars_converts_multiple_pairs();