Open-This
view release on metacpan or search on metacpan
#!/usr/bin/env perl
use strict;
use warnings;
use Open::This qw( to_editor_args );
use Test::Differences qw( eq_or_diff );
use Test::More import => [qw( done_testing )];
use Test::Warnings ();
local $ENV{EDITOR} = 'kate';
eq_or_diff(
[ to_editor_args('t/git.t') ],
[
't/git.t',
],
'filename'
);
eq_or_diff(
[ to_editor_args('t/git.t:10') ],
[
'--line',
'10',
't/git.t',
],
'line'
);
eq_or_diff(
[ to_editor_args('t/git.t:10:22') ],
[
'--line',
'10',
'--column',
'22',
't/git.t',
],
'line and column'
);
done_testing();
( run in 2.380 seconds using v1.01-cache-2.11-cpan-437f7b0c052 )