App-rshasum

 view release on metacpan or  search on metacpan

t/argv.t  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env perl
 
use strict;
use Test::More tests => 1;
 
use Path::Tiny   qw/ path tempdir tempfile cwd /;
use App::rshasum ();
 
{
    local @ARGV = ( "--digest=SHA-256", "/" );
 
    eval { App::rshasum->run(); };
 
    my $err = $@;
 
    my $needle =
qq#Leftover arguments "/" in the command line. (Did you intend to use --start-path ?)#;
 
    # TEST
    like( $err, qr#\A\Q$needle\E#, "right exception thrown" );



( run in 1.753 second using v1.01-cache-2.11-cpan-49f99fa48dc )