Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* Implement [Tech Story: Methods for wikiQtests].

  • Loading branch information...
commit f7f1465daf2d5e176cf938bda3109dc119303a52 1 parent 39d8f57
@audreyt audreyt authored
Showing with 22 additions and 0 deletions.
  1. +22 −0 stbin/run-wiki-tests
View
22 stbin/run-wiki-tests
@@ -200,6 +200,28 @@ use Socialtext::WikiFixture;
unshift @{ $self->{table} }, @{ $tp->{table} };
}
}
+
+ sub call {
+ my $self = shift;
+ my $page_name = shift;
+
+ print "# Calling $page_name with arguments: @_\n";
+
+ my (@setup, @teardown);
+ for my $arg (@_) {
+ $arg =~ /^(\w+)=(.*)/ or die "Invalid argument: $arg";
+ push @setup, [set => $1 => '', 1];
+ push @setup, [set => "st-original-$1" => "%%$1%%"];
+ push @setup, [set => $1 => $2];
+ push @teardown, [set => $1 => "%%st-original-$1%%"];
+ push @teardown, [set => "st-original-$1" => ''];
+ }
+
+ if ($self->{testplan}->is_page_runnable($page_name)) {
+ my $tp = $self->{testplan}->new_testplan($page_name);
+ unshift @{ $self->{table} }, @setup, @{ $tp->{table} }, @teardown;
+ }
+ }
}
{
package Socialtext::WikiObject::TestPlan::SkipAndRun;
Please sign in to comment.
Something went wrong with that request. Please try again.