Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bfa4263

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 a15a40a commit bfa4263

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ sub pgbench
510510
qr{processed: 1/1},
511511
qr{shell-echo-output}
512512
],
513-
[qr{command=8.: int 2\b}],
513+
[qr{command=8.: int 1\b}],
514514
'pgbench backslash commands',
515515
{
516516
'001_pgbench_backslash_commands' => q{-- run set
@@ -522,10 +522,10 @@ sub pgbench
522522
\sleep 0 s
523523
\sleep :zero
524524
-- setshell and continuation
525-
\setshell two\
526-
expr \
527-
1 + :one
528-
\set n debug(:two)
525+
\setshell another_one\
526+
echo \
527+
:one
528+
\set n debug(:another_one)
529529
-- shell
530530
\shell echo shell-echo-output
531531
}

0 commit comments

Comments
 (0)