📄 test.pl
字号:
# test.pl - a bit braindead testingn script; needs a lot of work!# Eric Lease Morgan <emorgan@nd.edu># University Libraries of Notre Dame# 2002/08/26 - updated for version 2.51 of MyLibrary.pm# Before `make install' is performed this script should be runnable with# `make test'. After `make install' it should work as `perl test.pl'######################### We start with some black magic to print on failure.# Change 1..1 below to 1..last_test_to_print .# (It may become useful if the test is moved to ./t subdirectory.)BEGIN { $| = 1; print "1..6\n"; }END {print "not ok 1\n" unless $loaded;}use MyLibrary;$loaded = 1;print "1) loading module.......... ok\n";######################### End of black magic.# Insert your test code below (better if it prints "ok 13"# (correspondingly "not ok 13") depending on the success of chunk 13# of the test code):#2 read configuration fileprint '2) read config file........ ';my $config = "./test.cfg";&MyLibrary::readConfig ("$config");print " ok\n";#3 initialize DBIprint '3) initialize DB I/O....... ';&MyLibrary::initalizeDBIO();print " ok\n";#4 check for simple help textsprint '4) find help texts......... ';&MyLibrary::findAllSimpleHelp('select * from help_simple');print ($#MyLibrary::simpleHelpID == 278 ? " ok\n" : " not ok; wrong number of help texts\n");#5 check for bib_databasesprint '5) check bib_databases..... ';&MyLibrary::findAllDatabases('select * from bib_databases');print ($#MyLibrary::databaseFKeys ? " ok\n" : " not ok; no bib_database fkey content");#6 check for referenceprint '6) check reference......... ';&MyLibrary::findAllDatabases('select * from reference');print ($#MyLibrary::referenceDates ? " ok\n" : " not ok; no reference date content");# doneprint "\nEverything looks good, now you can do 'make install'.\n\n";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -