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

Commit91d3580

Browse files
Use test functions in pg_rewind test module
Commit61081e7 introduced pg_rewind along with the test suite, whichensured that subroutines didn't incur more than one test to plan. Nowthat we no longer explicitly plan tests (since549ec20), we can usethe usual Test::More functions.Reviewed-by: Andrew Dunstan <andrew@dunslane.net>Discussion:https://postgr.es/m/AA527525-F0CC-4AA2-AF98-543CABFDAF59@yesql.se
1 parent2313a3e commit91d3580

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

‎src/bin/pg_rewind/t/RewindTest.pm

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,21 +102,10 @@ sub check_query
102102
],
103103
'>', \$stdout,'2>', \$stderr;
104104

105-
# We don't use ok() for the exit code and stderr, because we want this
106-
# check to be just a single test.
107-
if (!$result)
108-
{
109-
fail("$test_name: psql exit code");
110-
}
111-
elsif ($stderrne'')
112-
{
113-
diag$stderr;
114-
fail("$test_name: psql no stderr");
115-
}
116-
else
117-
{
118-
is($stdout,$expected_stdout,"$test_name: query result matches");
119-
}
105+
is($result, 1,"$test_name: psql exit code");
106+
is($stderr,'',"$test_name: psql no stderr");
107+
is($stdout,$expected_stdout,"$test_name: query result matches");
108+
120109
return;
121110
}
122111

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp