Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit53bb8ae

Browse files
committed
Switch to the new TAP tests API.
1 parent7f97a12 commit53bb8ae

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

‎contrib/raftable/t/000_basic.pl‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use PostgresNode;
55
use TestLib;
6-
use Test::Moretests=>5;
6+
use Test::Moretests=>10;
77

88
subgenstr
99
{
@@ -80,19 +80,21 @@ sub start_nodes
8080
sleep(5);
8181
while (my ($key,$value) =each(%tests))
8282
{
83-
my$o =$baker->psql('postgres',"select raftable('$key');");
84-
is($o,$value,"Baker has '$key'");
83+
my ($rc,$stdout,$stderr) =$baker->psql('postgres',"select raftable('$key');");
84+
is($rc, 0,"Baker returns '$key'");
85+
is($stdout,$value,"Baker has the proper value for '$key'");
8586
}
8687

8788
my$ok = 1;
88-
my$o =$baker->psql('postgres',"select raftable();");
89-
while ($o =~/\((\w+),(\w+)\)/g)
89+
my ($rc,$stdout,$stderr) =$baker->psql('postgres',"select raftable();");
90+
is($rc, 0,"Baker returns everything");
91+
while ($stdout =~/\((\w+),(\w+)\)/g)
9092
{
9193
if (!exists$tests{$1}) {$ok = 0;last; }
9294
my$val =delete$tests{$1};
9395
if ($valne$2) {$ok = 0;last; }
9496
}
9597
if (keys%tests > 0) {$ok = 0; }
96-
is($ok, 1,"Baker has everything");
98+
is($ok, 1,"Baker hasthe proper value foreverything");
9799

98100
exit(0);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp