test.sh

来自「PostgreSQL7.4.6 for Linux」· Shell 代码 · 共 48 行

SH
48
字号
#!/bin/shDBNAME=pltestecho -n "*** Destroy $DBNAME."dropdb $DBNAME > test.log 2>&1echo " Done. ***"echo -n "*** Create $DBNAME."createdb $DBNAME >> test.log 2>&1echo " Done. ***"echo -n "*** Create plpython."createlang plpythonu $DBNAME >> test.log 2>&1echo " Done. ***"echo -n "*** Create tables"psql -q $DBNAME < plpython_schema.sql >> test.log 2>&1echo -n ", data"psql -q $DBNAME < plpython_populate.sql >> test.log 2>&1echo -n ", and functions and triggers."psql -q $DBNAME < plpython_function.sql >> test.log 2>&1echo " Done. ***"echo -n "*** Running feature tests."psql -q -e $DBNAME < plpython_test.sql > feature.output 2>&1echo " Done. ***"echo -n "*** Running error handling tests."psql -q -e $DBNAME < plpython_error.sql > error.output 2>&1echo " Done. ***"echo -n "*** Checking the results of the feature tests."if diff -c feature.expected feature.output > feature.diff 2>&1 ; then  echo -n " passed!"else  echo -n " failed!  Please examine feature.diff."fiecho " Done. ***"echo -n "*** Checking the results of the error handling tests."if diff -c error.expected error.output > error.diff 2>&1 ; then  echo -n " passed!"else  echo -n " failed!  Please examine error.diff."fiecho " Done. ***"

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?