Take second split from the end (#6156)

This commit is contained in:
Mikhail Timofeev
2022-08-29 14:29:38 +03:00
committed by GitHub
parent 2959f467ce
commit 30031f7d7b

View File

@@ -12,8 +12,8 @@ Describe "PostgreSQL" {
It "PostgreSQL version should correspond to the version in the toolset" {
$toolsetVersion = Get-ToolsetValue 'postgresql.version'
# Client version
(psql --version).split()[-1] | Should -BeLike "$toolsetVersion*"
(psql --version).split()[-2] | Should -BeLike "$toolsetVersion*"
# Server version
(pg_config --version).split()[-1] | Should -BeLike "$toolsetVersion*"
(pg_config --version).split()[-2] | Should -BeLike "$toolsetVersion*"
}
}