diff --git a/t/19-logging.t b/t/19-logging.t index 3f38a7b..a124ade 100644 --- a/t/19-logging.t +++ b/t/19-logging.t @@ -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 { diff --git a/t/30-examples-class-app.t b/t/30-examples-class-app.t index 8762e26..de5276e 100644 --- a/t/30-examples-class-app.t +++ b/t/30-examples-class-app.t @@ -65,15 +65,19 @@ subtest { is %data, ''; }; -subtest { - plan 3; - - my %data = run-psgi-request($app, 'GET', '/tmpl/xyz'); - my $html = %data[2]; - %data[2] = ''; - is-deeply %data, [200, ["Content-Type" => "text/html"], ''], 'route GET /'; - like $html, rx:s/\A greeting for xyz\<\/title\>/; - is %data, ''; -}; - - +# 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[2]; + %data[2] = ''; + is-deeply %data, [200, ["Content-Type" => "text/html"], ''], 'route GET /'; + like $html, rx:s/\A greeting for xyz\<\/title\>/; + is %data, ''; + } +} diff --git a/t/30-examples-gradual.t b/t/30-examples-gradual.t index c6cc033..262b2c4 100644 --- a/t/30-examples-gradual.t +++ b/t/30-examples-gradual.t @@ -75,12 +75,18 @@ subtest { is %data, '', 'stderr'; }, '/xyz'; -subtest { - plan 2; - my %data = run-psgi-request($app, 'GET', '/cakes/carrot'); - is-deeply %data, [200, ["Content-Type" => "text/html"], "Carrot Cake\n"], 'route GET /cakes/carrot'; - is %data, ''; -}; +# 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, [200, ["Content-Type" => "text/html"], "Carrot Cake\n"], 'route GET /cakes/carrot'; + is %data, ''; + } +} # test 8 diff --git a/t/30-examples-layout.t b/t/30-examples-layout.t index 7ae77da..8149b8d 100644 --- a/t/30-examples-layout.t +++ b/t/30-examples-layout.t @@ -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'; diff --git a/t/30-examples-pastebin.t b/t/30-examples-pastebin.t index 04d0c5f..2cffd9c 100644 --- a/t/30-examples-pastebin.t +++ b/t/30-examples-pastebin.t @@ -15,17 +15,23 @@ die "Directory examples/pastebin/data exists. Remove it before running the test. %*ENV = $*CWD.absolute; my $app = EVALFILE "pastebin.pl6"; -subtest { - plan 2; - my %data = run-psgi-request($app, 'GET', '/'); - my $main_html = qq{
-
- -
-}; - is-deeply %data, [200, ["Content-Type" => "text/html"], $main_html], 'route GET /'; - is %data, ''; -}, '/'; +if $*DISTRO.is-win { + skip "Skipping failing Windows test..."; +} +else { + subtest { + plan 2; + my %data = run-psgi-request($app, 'GET', '/'); + my $main_html = qq{
+
+ +
+ }; + is-deeply %data, [200, ["Content-Type" => "text/html"], $main_html], 'route GET /'; + is %data, ''; + + }, '/'; +} subtest { plan 6; @@ -44,7 +50,6 @@ subtest { is-deeply %data2, [200, ["Content-Type" => "text/plain"], 'http::/bailador.net'], 'GET /paste/...'; is %data2, ''; - }, 'paste'; rmtree 'data'; diff --git a/t/30-examples-templates.t b/t/30-examples-templates.t index 2f89614..c0ee248 100644 --- a/t/30-examples-templates.t +++ b/t/30-examples-templates.t @@ -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'; @@ -59,4 +64,3 @@ subtest { # vim: expandtab # vim: tabstop=4 -