File tree 4 files changed +21
-11
lines changed
4 files changed +21
-11
lines changed Original file line number Diff line number Diff line change
1
+ -It/lib
Original file line number Diff line number Diff line change 1
1
use strict;
2
2
use warnings qw\ all \ ;
3
+ use Bashon;
3
4
use Test::More;
4
- use Cwd qw\ cwd \ ;
5
-
6
- sub bashon {
7
- my $cmd = shift ;
8
- qx{ /usr/bin/env /bin/bash --noprofile --norc -c '. bashon.sh;$cmd '}
9
- }
10
5
11
6
is(bashon(' printf %s salut' ), ' salut' , ' sourcing bashon.sh works' );
12
7
Original file line number Diff line number Diff line change 1
1
use strict;
2
2
use warnings qw\ all \ ;
3
+ use Bashon;
3
4
use Test::More;
4
5
5
- sub bashon {
6
- my $cmd = shift ;
7
- qx{ /usr/bin/env /bin/bash --noprofile --rcfile ../bashon.sh -c '$cmd '}
8
- }
9
-
10
6
subtest ' null' => sub {
11
7
plan tests => 1;
12
8
Original file line number Diff line number Diff line change
1
+ package Bashon ;
2
+
3
+ use strict;
4
+ use warnings qw\ all \ ;
5
+
6
+ BEGIN {
7
+ require Exporter;
8
+
9
+ our @ISA = qw\ Exporter \ ;
10
+ our @EXPORT = qw\ bashon \ ;
11
+ }
12
+
13
+ our sub bashon {
14
+ my $cmd = shift ;
15
+ qx{ /usr/bin/env /bin/bash --noprofile --norc -c '. bashon.sh;$cmd '}
16
+ }
17
+
18
+ 1;
You can’t perform that action at this time.
0 commit comments