summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2009-10-12 00:30:06 +0100
committerSteve Hay <SteveHay@planit.com>2009-10-12 00:30:06 +0100
commitfdec8735b5a913c856025793c0239d908ad4bc2e (patch)
tree3f8cef9e5ea20093248d4e992655cadb7568a8ce
parent9924e635effbf0beeff7c2e2ad828241da616e10 (diff)
downloadperl-fdec8735b5a913c856025793c0239d908ad4bc2e.tar.gz
Implement TODO support locally in t/comp/opsubs.t
Removes the FAILED for test 22 on Win32.
-rw-r--r--t/comp/opsubs.t35
1 files changed, 30 insertions, 5 deletions
diff --git a/t/comp/opsubs.t b/t/comp/opsubs.t
index bfb6c3f3ca..89b1af517f 100644
--- a/t/comp/opsubs.t
+++ b/t/comp/opsubs.t
@@ -12,7 +12,12 @@ my $test = 0;
sub failed {
my ($got, $expected, $name) = @_;
- print "not ok $test - $name\n";
+ if ($::TODO) {
+ print "not ok $test - $name # TODO: $::TODO\n";
+ }
+ else {
+ print "not ok $test - $name\n";
+ }
my @caller = caller(1);
print "# Failed test at $caller[1] line $caller[2]\n";
if (defined $got) {
@@ -28,7 +33,12 @@ sub like {
my ($got, $pattern, $name) = @_;
$test = $test + 1;
if (defined $got && $got =~ $pattern) {
- print "ok $test - $name\n";
+ if ($::TODO) {
+ print "ok $test - $name # TODO: $::TODO\n";
+ }
+ else {
+ print "ok $test - $name\n";
+ }
# Principle of least surprise - maintain the expected interface, even
# though we aren't using it here (yet).
return 1;
@@ -40,7 +50,12 @@ sub is {
my ($got, $expect, $name) = @_;
$test = $test + 1;
if (defined $got && $got eq $expect) {
- print "ok $test - $name\n";
+ if ($::TODO) {
+ print "ok $test - $name # TODO: $::TODO\n";
+ }
+ else {
+ print "ok $test - $name\n";
+ }
return 1;
}
failed($got, "'$expect'", $name);
@@ -50,7 +65,12 @@ sub isnt {
my ($got, $expect, $name) = @_;
$test = $test + 1;
if (defined $got && $got ne $expect) {
- print "ok $test - $name\n";
+ if ($::TODO) {
+ print "ok $test - $name # TODO: $::TODO\n";
+ }
+ else {
+ print "ok $test - $name\n";
+ }
return 1;
}
failed($got, "not '$expect'", $name);
@@ -60,7 +80,12 @@ sub can_ok {
my ($class, $method) = @_;
$test = $test + 1;
if (eval { $class->can($method) }) {
- print "ok $test - $class->can('$method')\n";
+ if ($::TODO) {
+ print "ok $test - $class->can('$method') # TODO: $::TODO\n";
+ }
+ else {
+ print "ok $test - $class->can('$method')\n";
+ }
return 1;
}
my @caller = caller;