From 8ba87fa87944c4ed22fc8550fd6f46db86ccd80c Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Sat, 8 Aug 2015 12:56:27 +0300 Subject: [PATCH] test.sh: simpler sed expression --- test/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test.sh b/test/test.sh index 478ea6c..801b5dc 100755 --- a/test/test.sh +++ b/test/test.sh @@ -422,7 +422,7 @@ test_database_change() { db1=`psql -tAq p1 -c "select current_database()"` cp test.ini test.ini.bak - sed 's/\(p1 = port=6666 host=127.0.0.1 dbname=\)\(p1\)/\1p0/g' test.ini >test2.ini + sed '/^p1 =/s/dbname=p1/dbname=p0/g' test.ini >test2.ini mv test2.ini test.ini kill -HUP `cat $BOUNCER_PID` @@ -437,7 +437,7 @@ test_database_change() { admin "show databases" admin "show pools" - test $db1 = "p1" -a $db2 = "p0" + test "$db1" = "p1" -a "$db2" = "p0" } echo "Testing for sudo access." -- 2.39.5