Skip to content

Commit 1a72124

Browse files
committed
Don't assume expr is available in pgbench tests
Windows hosts do not normally come with expr, so instead of using that to test the \setshell command, use echo instead, which is fairly universally available. Backpatch to release 11, where this came in. Problem found by me, patch by Fabien Coelho.
1 parent fd7d387 commit 1a72124

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/bin/pgbench/t/001_pgbench_with_server.pl

+5-5
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ sub pgbench
512512
qr{processed: 1/1},
513513
qr{shell-echo-output}
514514
],
515-
[qr{command=8.: int 2\b}],
515+
[qr{command=8.: int 1\b}],
516516
'pgbench backslash commands',
517517
{
518518
'001_pgbench_backslash_commands' => q{-- run set
@@ -524,10 +524,10 @@ sub pgbench
524524
\sleep 0 s
525525
\sleep :zero
526526
-- setshell and continuation
527-
\setshell two\
528-
expr \
529-
1 + :one
530-
\set n debug(:two)
527+
\setshell another_one\
528+
echo \
529+
:one
530+
\set n debug(:another_one)
531531
-- shell
532532
\shell echo shell-echo-output
533533
}

0 commit comments

Comments
 (0)