Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8b5a87e386
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 30 lines (23 sloc) 0.967 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
use v6;

use Test;

plan 9;

ok !$Test::todo_next_test, '$Test::todo_next_test set to False intially';

if ($?COMPILER and $?COMPILER eq 'Pugs') {
    todo :pugs; # never unTODO this.
    my $saved_val = $Test::todo_next_test;
    ok 0, "this test should be TODO'd";
    ok $saved_val, 'todo() sets $Test::todo_next_test to True';
    ok !$Test::todo_next_test, 'todo() only affects the next one test';

    todo :pugs('9999' ~ $?VERSION); # never unTODO this.
    $saved_val = $Test::todo_next_test;
    ok 0, "this test should be TODO'd";
    ok $saved_val, 'todo() sets $Test::todo_next_test to True';
    ok !$Test::todo_next_test, 'todo() only affects the next one test';

    todo :pugs('-10.' ~ $?VERSION); # never unTODO this.
    $saved_val = $Test::todo_next_test;
    ok 1, "this test should not be TODO'd";
    #warn ">>> $saved_val\n";
    ok !$saved_val, "todo() didn't set \$Test::todo_next_test to True";
} else {
    skip 'no general tests', 9;
}
Something went wrong with that request. Please try again.