Skip to content

Commit

Permalink
skip windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrowder committed Mar 2, 2018
1 parent 3c14544 commit e72b661
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 32 deletions.
2 changes: 1 addition & 1 deletion t/19-logging.t
Expand Up @@ -91,7 +91,7 @@ subtest {

}, 'Bailador::Log::Formatter';

# Note: On Windows the dollowing tests all fail
# Note: On Windows the following tests all fail
# They are skipped for now.

if $*DISTRO. is-win {
Expand Down
28 changes: 16 additions & 12 deletions t/30-examples-class-app.t
Expand Up @@ -65,15 +65,19 @@ subtest {
is %data<err>, '';
};

subtest {
plan 3;

my %data = run-psgi-request($app, 'GET', '/tmpl/xyz');
my $html = %data<response>[2];
%data<response>[2] = '';
is-deeply %data<response>, [200, ["Content-Type" => "text/html"], ''], 'route GET /';
like $html, rx:s/\<title\>A greeting for xyz\<\/title\>/;
is %data<err>, '';
};


# test 7
if $*DISTRO.is-win {
skip "Skipping failing Windows test...";
}
else {
subtest {
plan 3;

my %data = run-psgi-request($app, 'GET', '/tmpl/xyz');
my $html = %data<response>[2];
%data<response>[2] = '';
is-deeply %data<response>, [200, ["Content-Type" => "text/html"], ''], 'route GET /';
like $html, rx:s/\<title\>A greeting for xyz\<\/title\>/;
is %data<err>, '';
}
}
18 changes: 12 additions & 6 deletions t/30-examples-gradual.t
Expand Up @@ -75,12 +75,18 @@ subtest {
is %data<err>, '', 'stderr';
}, '/xyz';

subtest {
plan 2;
my %data = run-psgi-request($app, 'GET', '/cakes/carrot');
is-deeply %data<response>, [200, ["Content-Type" => "text/html"], "Carrot Cake\n"], 'route GET /cakes/carrot';
is %data<err>, '';
};
# test 7
if $*DISTRO.is-win {
skip "Skipping failing Windows test...";
}
else {
subtest {
plan 2;
my %data = run-psgi-request($app, 'GET', '/cakes/carrot');
is-deeply %data<response>, [200, ["Content-Type" => "text/html"], "Carrot Cake\n"], 'route GET /cakes/carrot';
is %data<err>, '';
}
}


# test 8
Expand Down
5 changes: 5 additions & 0 deletions t/30-examples-layout.t
Expand Up @@ -4,6 +4,11 @@ use Test;

use Bailador::Test;

if $*DISTRO.is-win {
skip-rest "The following subtests fail to run on Windows.";
exit;
}

plan 2;

chdir 'examples/layout';
Expand Down
29 changes: 17 additions & 12 deletions t/30-examples-pastebin.t
Expand Up @@ -15,17 +15,23 @@ die "Directory examples/pastebin/data exists. Remove it before running the test.
%*ENV<BAILADOR_APP_ROOT> = $*CWD.absolute;
my $app = EVALFILE "pastebin.pl6";

subtest {
plan 2;
my %data = run-psgi-request($app, 'GET', '/');
my $main_html = qq{<form action='/new_paste' method='post'>
<textarea name='content' cols=50 rows=10></textarea><br />
<input type='submit' value='Paste it!' />
</form>
};
is-deeply %data<response>, [200, ["Content-Type" => "text/html"], $main_html], 'route GET /';
is %data<err>, '';
}, '/';
if $*DISTRO.is-win {
skip "Skipping failing Windows test...";
}
else {
subtest {
plan 2;
my %data = run-psgi-request($app, 'GET', '/');
my $main_html = qq{<form action='/new_paste' method='post'>
<textarea name='content' cols=50 rows=10></textarea><br />
<input type='submit' value='Paste it!' />
</form>
};
is-deeply %data<response>, [200, ["Content-Type" => "text/html"], $main_html], 'route GET /';
is %data<err>, '';

}, '/';
}

subtest {
plan 6;
Expand All @@ -44,7 +50,6 @@ subtest {
is-deeply %data2<response>, [200, ["Content-Type" => "text/plain"], 'http::/bailador.net'], 'GET /paste/...';
is %data2<err>, '';


}, 'paste';

rmtree 'data';
6 changes: 5 additions & 1 deletion t/30-examples-templates.t
Expand Up @@ -4,6 +4,11 @@ use Test;

use Bailador::Test;

if $*DISTRO.is-win {
skip-rest "The following subtests fail to run on Windows.";
exit;
}

plan 4;

chdir 'examples/templates';
Expand Down Expand Up @@ -59,4 +64,3 @@ subtest {

# vim: expandtab
# vim: tabstop=4

0 comments on commit e72b661

Please sign in to comment.