App-EditorTools
view release on metacpan or search on metacpan
t/CmdInstallEmacs.t view on Meta::CPAN
1314151617181920212223242526272829303132333435363738394041424344454647
my
$return
= AETest->test( [
qw{ install-emacs --print --dest x }
],
''
);
is(
$return
->stdout,
''
,
'Install-Emacs w/ too many opts'
);
like(
$return
->error,
qr/cannot be combined/
,
'... too many opts'
);
}
{
my
$return
= AETest->test( [
qw{ install-emacs --print }
],
''
);
like(
$return
->stdout,
qr/App::EditorTools::Command::InstallEmacs generated script/
,
'--print'
);
like(
$return
->stderr,
qr/STDOUT/
,
'... good location'
);
is(
$return
->error,
undef
,
'... no error'
);
}
{
my
$return
= AETest->test( [
qw{ install-emacs --local --dryrun }
],
''
);
is(
$return
->stdout,
''
,
'--local'
);
like(
$return
->stderr,
qr{..emacs\.d.editortools.el}
,
'... good location'
);
is(
$return
->error,
undef
,
'... no error'
);
}
{
my
$return
= AETest->test( [
qw{ install-emacs --dryrun }
],
''
);
is(
$return
->stdout,
''
,
'default'
);
like(
$return
->stderr,
qr{..emacs\.d.editortools.el}
,
'... good location'
);
is(
$return
->error,
undef
,
'... no error'
);
}
{
my
$return
= AETest->test( [
qw{ install-emacs --dest '/tmp/script.el' --dryrun }
],
''
);
is(
$return
->stdout,
''
,
'--dest'
);
like(
$return
->stderr,
qr{\Q/tmp/script.el\E}
,
'... good location'
);
is(
$return
->error,
undef
,
'... no error'
);
}
t/CmdInstallVim.t view on Meta::CPAN
1314151617181920212223242526272829303132333435363738394041424344454647
my
$return
= AETest->test( [
qw{ install-vim --print --dest x }
],
''
);
is(
$return
->stdout,
''
,
'Install-Vim w/ too many opts'
);
like(
$return
->error,
qr/cannot be combined/
,
'... too many opts'
);
}
{
my
$return
= AETest->test( [
qw{ install-vim --print }
],
''
);
like(
$return
->stdout,
qr/" App::EditorTools::Command::InstallVim generated script/
,
'--print'
);
like(
$return
->stderr,
qr/STDOUT/
,
'... good location'
);
is(
$return
->error,
undef
,
'... no error'
);
}
{
my
$return
= AETest->test( [
qw{ install-vim --local --dryrun }
],
''
);
is(
$return
->stdout,
''
,
'--local'
);
like(
$return
->stderr,
qr{.ftplugin.perl.editortools.vim}
,
'... good location'
);
is(
$return
->error,
undef
,
'... no error'
);
}
{
my
$return
= AETest->test( [
qw{ install-vim --dryrun }
],
''
);
is(
$return
->stdout,
''
,
'default'
);
like(
$return
->stderr,
qr{.ftplugin.perl.editortools.vim}
,
'... good location'
);
is(
$return
->error,
undef
,
'... no error'
);
}
{
my
$return
= AETest->test( [
qw{ install-vim --dest '/tmp/script.vim' --dryrun }
],
''
);
is(
$return
->stdout,
''
,
'--dest'
);
like(
$return
->stderr,
qr{\Q/tmp/script.vim\E}
,
'... good location'
);
is(
$return
->error,
undef
,
'... no error'
);
}
t/CmdRenamePackageFromPath.t view on Meta::CPAN
8910111213141516171819202122232425262728use
AETest;
{
my
$return
= AETest->test( [
qw(renamepackagefrompath -f lib/New/Path.pm)
],
<<'CODE' );
package Old::Package;
use strict; use warnings;
CODE
like(
$return
->stdout,
qr/package New::Path;/
,
'RenamePackage... file does not exists'
);
diag
$return
->stderr
if
$return
->stderr;
is(
$return
->error,
undef
,
'... no error'
);
}
{
my
$return
= AETest->test( [
qw(renamepackagefrompath -f lib/App/EditorTools.pm)
],
<<'CODE' );
package Old::Package;
use strict; use warnings;
CODE
like(
$return
->stdout,
qr/package App::EditorTools;/
,
'RenamePackage... exists'
);
( run in 0.250 second using v1.01-cache-2.11-cpan-8d75d55dd25 )