version up
[mrsh.git] / t / 07_host_routing.t
blobe0edfa9fdd3962ccf35b2d17055b955b3cd2b6b7
2 use strict;
3 use warnings;
5 use Test;
6 use App::MrShell;
8 plan tests => 2;
10 my $shell = App::MrShell->new;
11 my @cmd = (qw(a b c %h d e f %h g h i j k l));
13 DIRECT: {
14     my $host  = "nombre";
15     my @type1 = $shell->set_subst_vars('%h'=>$host)->subst_cmd_vars(@cmd);
16     ok("@type1", "a b c nombre d e f nombre g h i j k l");
19 INDIRECT1: {
20     my $host  = "via1!nombre";
21     my @type1 = $shell->set_subst_vars('%h'=>$host)->subst_cmd_vars(@cmd);
22     ok("@type1", "a b c via1 a b c nombre d e f via1 a b c via1 a b c nombre d e f nombre g h i j k l");