From: Marko Kreen Date: Sat, 8 Aug 2015 09:56:27 +0000 (+0300) Subject: test.sh: simpler sed expression X-Git-Tag: pgbouncer_1_7_rc1~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ba87fa87944c4ed22fc8550fd6f46db86ccd80c;p=pgbouncer test.sh: simpler sed expression --- 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."