Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/tcltest?V=65
QUERY_STRINGV=65
CONTENT_TYPE
DOCUMENT_URI/revision/tcltest
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR172.71.254.54
REMOTE_PORT26124
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR3.133.12.172
HTTP_CF_RAY87e20dc43b0f22e5-ORD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_ACCEPT*/*
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_CF_CONNECTING_IP3.133.12.172
HTTP_CDN_LOOPcloudflare
HTTP_CF_IPCOUNTRYUS

Body


Error

Unknow state transition: LINE -> END

-code

1

-level

0

-errorstack

INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit tcltest \n\ \ \ \[http://www.tcl.tk/man/tcl/TclCmd/tcltest.htm%|%official\ reference\]:\ \ \ \nhttp://tmml.sourceforge.net/doc/tcl/tcltest.html\n\ \ \ \[https://wuhrr.wordpress.com/2011/03/28/getting-started-with-tcltest/%|%Getting\ Started\ with\ tcltest\],\ \[Hai\ Vu\],\ 2011-03-28:\ \ \ \nhttp://www.tcl.tk/man/tcl8.5/TclCmd/tcltest.htm\n\ \ \ \[https://wuhrr.wordpress.com/2011/03/29/tcltest-part-2-multi-module-test-suite/%|%tcltest\ Part\ 2:\ \ Multi-Module\ Test\ Suite\],\ \[Hai\ Vu\],\ 2011-03-29:\ \ \ \n\[Hai\ Vu\]'s\ https://wuhrr.wordpress.com/category/programming/tcl-programming/%|%blog%|%\ has\ a\ series\ of\ nice\ articles\ on\ tcltest.\n\nVersion\ 2,\ distributed\ with\ Tcl\ from\ version\ 8.4,\ \ is\ much\ more\ flexible\ in\ the\nThe\ tcltest\ package\ provides\ the\ user\ with\ utility\ tools\ for\ writing\ and\nrunning\ tests\ in\ the\ Tcl\ test\ suite.\ It\ can\ also\ be\ used\ to\ create\ a\ customized\ntest\ harness\ for\ an\ extension.\n\nTcltest\ is\ bundled\ into\ the\ \[Tcl\]\ software\ core\ distribution.\n\nkind\ of\ matching\ it\ permits.\ \ See\ \[tcltest\ customMatch\]\ for\ some\ examples.\n\ \ \ \nScripts\ for\ `test`\ options\ like\ `-setup`,\ `-body`,\ and\ `-cleanup`\ are\ evaluated\nWhen\ working\ with\ tcltest,\ recall\ that\ the\ \[return\]\ command\ is\ not\ just\ for\nprocedures,\ but\ can\ be\ used\ in\ scripts,\ such\ as\ the\ body\ of\ a\ test.\ \ See\n\[return\],\ \[source\],\ and\ \[eval\]\ for\ other\ details.\ \ The\ last\ line\ of\ a\ test\ is\noften\ \[return\]\ or\ \[set\].\nCustomizing\ the\ output\ format\ of\ cleanupTests\ is\ not\ very\ feasible\ at\ this\nScripts\ for\ \[\[test\]\]\ options\ like\ ''-setup'',\ ''-body'',\ and\ '--cleanup''\ are\nevaluated\ in\ the\ caller's\ scope.\ \ This\ is\ the\ same\ rule\ as\ for\ other\ control\nstructure\ commands\ like\ \[if\]\ or\ \[while\].\ \ Any\ command\ that\ takes\ a\ script\ as\ an\nargument\ and\ controls\ something\ about\ how\ that\ script\ is\ evaluated\ can\ be\nviewed\ as\ a\ kind\ of\ control\ structure.\ Another\ aspect\ of\ the\ control\ structure\nbehaviour\ of\ \[\[test\]\]\ is\ that\ '''-constraints''\ makes\ execution\ of\ other\ scripts\nconditional.\n\ntime,\ as\ it\ is\ used\ as\ a\ programmatic\ interface\ for\ sub-processes\ in\ \[runAllTests\].\n\n\n**\ Alternatives\ **\n\n\[New\ Test\ Package\]\n**\ Running\ tcltest\ **\n\[tcltap\],\ a\ simple\ alternative\ for\ the\ small\ test\n\n\[TTXN\]\ TclTest\ eXtended\ Notation\n\n\[Caius\]\ Functional\ testing\ framework\ based\ on\ \[ITcl\],\ \[Expect\]\ and\ \[Selenium\].\n\n\n\nTo\ run\ the\ Tcl\ source\ code\ test\ suite\ against\ another\ installed\ Tcl\ interpreter:\n\n======none\ntclsh\ all.tcl\n======\n\n\n\nSome\ commands\ specific\ for\ testing\ internals\ are\ in\ the\ `Tcltest`\ package\ (note:\ not\ `tcltest`),\ which\ is\ not\ built\ by\ default.\n`Tcltest`\ is\ not\ (yet?)\ available\ as\ an\ extension,\ so\ it\ needs\ to\ be\ built\ into\ a\ special\ `tcltest`\ executable\ with:\n\n======none\n\ \ \$\ make\ runtest\n\ \ \$\ ./tcltest\n\ \ %\ package\ require\ Tcltest\n\ \ 8.6.2\n\ \ %\ llength\ \[info\ commands\ test*\]\n\ \ 85\nThese\ commands\ include\ `testparser`,\ mentioned\ elsewhere\ on\ the\ wiki\ (though\ \[tclparser\]\ provides\ an\ alternative\ as\ a\ loadable\ extension).\nThese\ commands\ include\ \[testparser\],\ mentioned\ elsewhere\ on\ the\ wiki\ (though\ \[tclparser\]\ provides\ an\ alternative\ as\ a\ loadable\ extension).\n**\ Tutorials\ **\n\n|\ \[http://web.archive.org/web/20080804010056/www.tclscripting.com/articles/apr06/article2.html%|%Installing\ tcltest%|%\]\ |\[Bryan\ Oakley\],\ 2006.\ \ How\ to\ install\ tcltest\ |\n|\ \[http://web.archive.org/web/20080617153002/www.tclscripting.com/articles/apr06/article1.html%|%Getting\ started\ with\ tcltest%|%\]\ |\ by\ \[Bryan\ Oakley\],\ 2006.\ \ How\ to\ use\ tcltest\ |\n***\ Run\ a\ Tcl\ test\ in\ verbose\ mode\ ***\n**\ Examples\ **\nA\ wonderful\ addition\ to\ this\ page\ would\ be\ instructions\ on\ how\ to\ run\n\[How\ to\ write\ tcltest\ result\ values\]\n\[DGP\]\ answers:\n\[Your\ first\ tcltests\]\n======none\n***\ complex\ results\ ***\n\n\[RHS\]\ One\ way\ to\ handle\ tests\ that\ the\ ''-result''\ option\ can't\ handle\ is\ to\ do\ something\ like:\ntest\ mytest-1.1\ \{\n\ test\ mytest-1.1\ \{\n\ \ \ \ \ Calling\ my\ proc\ should\ always\ return\ a\ list\ of\ at\ least\ length\ 3\n\ \}\ -body\ \{\n\ \ \ \ \ set\ result\ \[myProc\ a\ b\ c\ d\ e\]\n\ \ \ \ \ #\ -result\ can't\ handle\ \{>=\ llength\ 3\},\ so\ we\ test\ it\ here\n\ \ \ \ \ expr\ \{\ \[llength\ \$result\]\ >=\ 3\ \}\n\ \}\ -result\ \{1\}\n\n\n----\n\[customMatch\]\ can\ also\ be\ used\ to\ the\ same\ effect:\ Define\ a\ script\ that\ compares\ a\ an\ actual\ result\ with\ a\ target\ result.\ \ Then\ use\ \[customMatch\]\ to\ \"register\"\ that\ script\ for\ the\ ''-match''\ option.\ \ The\ script\ should\ return\ a\ boolean\ option\ indicating\ match\ or\ no\ match.\n----\n**\ Other\ **\n\n\[A\ look\ at\ the\ Tcl\ test\ suite\ with\ gcov\]\n\n**\ Testimonials\ **\n\n\[VI\]\ :\ 2003/10/02.\ \ We\ at\ \[http://www.comit.com\]\ use\ Tcl\ (and\ Tk)\ extensively.\nWe\ use\ Tcl\ for\ hardware\ testing\ in\ simulation\ (think\ multimillion-gate,\nmultifunction\ asic\ verification).\ \ One\ of\ the\ major\ factors\ in\ our\ initial\ndecision\ to\ use\ Tcl\ and\ our\ continuing\ to\ use\ tcl\ is\ tcltest.\ \ \ We\ use\ most\ntcltest\ features\ including\ constraints\ and\ are\ very\ pleased\ with\ the\ easy\nconfiguration\ of\ tests\ and\ the\ reporting.\ \ I\ do\ have\ gripes,\ but\ relatively\nminor,\ and\ since\ it\ is\ pure\ Tcl,\ we\ can\ change\ it\ anyways..\n\n\n\[PYK\]\ 2015-04-09:\ \ One\ strategy\ for\ some\ complex\ tests\ is\ to\ set\ `-result`\ to\n\n<<discussion>>\n\n\nA\ wonderful\ addition\ to\ this\ page\ would\ be\ instructions\ on\ how\ to\ run\none\ particular\ test,\ using\ verbose\ mode,\ for\ the\ purpose\ of\ reporting\ntest\ suite\ failures\ to\ a\ package\ developer.\n\[\[A\ Pythoneer\ has\ written\ an\ article--which\n\[DGP\]\ answers:\n\n\ make\ TESTFLAGS='-verbose\ tpse\ -file\ safe.test'\ test\n\n----\n\[CL\]\ can\ locate\ if\ helpful--illustrating\ use\ of\ PyUnit\ with\ Roman\ numeral\ conversion.\nIn\ the\ absence\ of\ any\ other\ inspiration,\nmaybe\ someone\ wants\ to\ steal\ that\ example\ ...\]\]\ \n\n\[RS\],\ off\ page\ topic:\ See\ also\ \[Roman\ numbers\]\ for\ Tcl\ routines.\n\n----\n\[AK\]:\nMost\ modules\ in\ \[tcllib\]\ come\ with\ .test\ files\ using\ tcltest\nfor\ regression\ testing.\n\n\[davidw\]\ 2003-10-03:\ I\ am\ doing\ some\ work\ to\ improve\ tcltest,\ specifically\ to\ give\ it\ an\ API\ so\ that\ you\ can\ programmatically\ fetch\ information\ about\ the\ test\ results.\ \ I\ would\ love\ to\ hear\ what\ sorts\ of\ features\ you\ would\ find\ useful\ -\ feel\ free\ to\ drop\ me\ email.\n\[davidw\]\ 2003/10/03:\ I\ am\ doing\ some\ work\ to\ improve\ tcltest,\ specifically\ to\ give\ it\ an\ API\ so\ that\ you\ can\ programmatically\ fetch\ information\ about\ the\ test\ results.\ \ I\ would\ love\ to\ hear\ what\ sorts\ of\ features\ you\ would\ find\ useful\ -\ feel\ free\ to\ drop\ me\ email.\n----\n\n\[disneylogic\]\ It\ would\ be\ useful\ to\ have\ a\ callback\ option,\ prefixed\ndetermine\ the\ correctness\ of\ a\ test.\ \ In\ lieu\ of\ demanding\ a\ real\ value\nto\ compare\ or\ abusing\ return\ codes,\ this\ would\ adjust\ 'tcltest'\ to\ perform\nmore\ like\ SUnit\ \[http://sourceforge.net/projects/sunit/\]\ in\ the\ Beck\ testing\ framework\ \[http://www.xprogramming.com/testfram.htm\].\n\nI\ encountered\ this\ when\ I\ was\ trying\ to\ write\ a\ routine\ to\ do\ sampling\ without\ replacement\ and\ could\ not\ specify\ a\ specific\ result\ to\ use\ to\ compare.\n\nIf\ there\ is\ already\ some\ way\ of\ doing\ this,\ please,\ please\ specify\ it\ here!\ \ I\ waded\ through\ the\ man\ page\ for\ a\ bit\ and\ couldn't\ find\ anything,\ particularly\ in\ the\ usage\ of\ 'test'\ section.\n\n\[DGP\]:\ Can\ you\ provide\ an\ example\ of\ what\ a\ test\n'''\[DGP\]'''\ Can\ you\ provide\ an\ example\ of\ what\ a\ test\nfor\ `test`\ ?\ \ Assume\ the\ reader\ knows\ nothing\ about\nfor\ \[test\]\ ?\ \ Assume\ the\ reader\ knows\ nothing\ about\n\n----\n\n\[LV\]:\ I\ have\ a\ programming\ ''itch''\ and\ am\ wondering\ if\ tcltest\ will\ help\ me\ scratch\ this\ itch.\n\[LV\]\ I\ have\ a\ programming\ ''itch''\ and\ am\ wondering\ if\ tcltest\ will\ help\ me\ scratch\ this\ itch.\nProblem:\ set\ up\ regression\ testing\ of\ a\ client/server\ command\ line\ and\ stdout/return\ code\ related\ pair\ of\ applications.\n\nCurrently,\ I'd\ love\ to\ find\ some\ help,\ tutorials,\ examples,\ etc.\ of\ how\ others\ are\ successfully\ doing\ this\ sort\ of\ thing\ with\ the\ result\ being\ test\ cases\ that\ are\ nearly\ trivial\ to\ read\ and\ write.\ I'd\ like\ to\ '''not'''\ have\ to\ teach\ people\ all\ of\ tcl\ before\ they\ can\ write\ new\ test\ cases.\ \ Ideally,\ having\ a\ half\ dozen\ or\ so\ examples\ should\ provide\ enough\ context\ to\ write\ additional\ code.\ \n\nI'd\ also\ like\ suggestions\ for\ '''best\ practices'''\ relating\ to\ this\ sort\ of\ use\ of\ tcltest.\n\nThanks!\n\n----\n\n\[fermulator\]:\ If\ a\ particular\ test\ spews\ out\ a\ bunch\ of\ debug\ information\ (i.e.\ 'test\ debug\ mode'),\ is\ there\ a\ way\ to\ redirect\ stdout,\ for\ a\ specific\ test,\ to\ /dev/null?\ \ I\ can't\ seem\ to\ find\ a\ way\ to\ hide\ stdout.\ \ It's\ basically:\n\[fermulator\]\ If\ a\ particular\ test\ spews\ out\ a\ bunch\ of\ debug\ information\ (i.e.\ 'test\ debug\ mode'),\ is\ there\ a\ way\ to\ redirect\ stdout,\ for\ a\ specific\ test,\ to\ /dev/null?\ \ I\ can't\ seem\ to\ find\ a\ way\ to\ hide\ stdout.\ \ It's\ basically:\n\n======\ntest\ print_debug_true\ \{\ntest\ print_debug_true\ \\\n\{\n\ \ \ \ work\ as\ expected\ (no\ errors\ are\ caught).\n\}\ -setup\ \{\n\}\ \\\n-setup\ \\\n\{\n\ \ \ \ \$myObj\ setDebug\ true\n\}\ -body\ \{\n\}\ \\\n-body\ \\\n\{\n\ \ \ \ #\ If\ it\ fails,\ error\ out,\ else\ return\ PASS.\n\ \ \ \ if\ \{\ \[catch\ \{\$myObj\ doStuff\}\ err\]\ \}\ \{\n\ \ \ \ if\ \{\ \[catch\ \{\$myObj\ doStuff\}\ err\]\ \}\ \\\n\ \ \ \ \{\n\ \ \ \ \}\n\ \ \ \ return\ PASS\n\}\ -result\ \{PASS\}\n\}\ \\\n-result\ \{PASS\}\n\nWhen\ I\ run\ the\ above\ test,\ stdout\ on\ the\ test\ output\ gets\ spammed\ with\ a\ whack\ of\ debug\ information,\ and\ it\ \"skews\"\ the\ high\ level\ view\ of\ which\ tests\ are\ running,\ passing,\ failing,\ etc.\n\n\n<<discussion>>\n\n<<categories>>\ Testing\ |\ Package\ |\ Command\ |\ Tcl\ |\ \ Arts\ and\ crafts\ of\ Tcl-Tk\ programming\n<<categories>>\ Testing\ |\ Package\ |\ Command\ |\ Tcl\ |\ \ Tcl\ syntax\ help\ |\ Arts\ and\ crafts\ of\ Tcl-Tk\ programming regexp2} CALL {my render tcltest \n\ \ \ \[http://www.tcl.tk/man/tcl/TclCmd/tcltest.htm%|%official\ reference\]:\ \ \ \nhttp://tmml.sourceforge.net/doc/tcl/tcltest.html\n\ \ \ \[https://wuhrr.wordpress.com/2011/03/28/getting-started-with-tcltest/%|%Getting\ Started\ with\ tcltest\],\ \[Hai\ Vu\],\ 2011-03-28:\ \ \ \nhttp://www.tcl.tk/man/tcl8.5/TclCmd/tcltest.htm\n\ \ \ \[https://wuhrr.wordpress.com/2011/03/29/tcltest-part-2-multi-module-test-suite/%|%tcltest\ Part\ 2:\ \ Multi-Module\ Test\ Suite\],\ \[Hai\ Vu\],\ 2011-03-29:\ \ \ \n\[Hai\ Vu\]'s\ https://wuhrr.wordpress.com/category/programming/tcl-programming/%|%blog%|%\ has\ a\ series\ of\ nice\ articles\ on\ tcltest.\n\nVersion\ 2,\ distributed\ with\ Tcl\ from\ version\ 8.4,\ \ is\ much\ more\ flexible\ in\ the\nThe\ tcltest\ package\ provides\ the\ user\ with\ utility\ tools\ for\ writing\ and\nrunning\ tests\ in\ the\ Tcl\ test\ suite.\ It\ can\ also\ be\ used\ to\ create\ a\ customized\ntest\ harness\ for\ an\ extension.\n\nTcltest\ is\ bundled\ into\ the\ \[Tcl\]\ software\ core\ distribution.\n\nkind\ of\ matching\ it\ permits.\ \ See\ \[tcltest\ customMatch\]\ for\ some\ examples.\n\ \ \ \nScripts\ for\ `test`\ options\ like\ `-setup`,\ `-body`,\ and\ `-cleanup`\ are\ evaluated\nWhen\ working\ with\ tcltest,\ recall\ that\ the\ \[return\]\ command\ is\ not\ just\ for\nprocedures,\ but\ can\ be\ used\ in\ scripts,\ such\ as\ the\ body\ of\ a\ test.\ \ See\n\[return\],\ \[source\],\ and\ \[eval\]\ for\ other\ details.\ \ The\ last\ line\ of\ a\ test\ is\noften\ \[return\]\ or\ \[set\].\nCustomizing\ the\ output\ format\ of\ cleanupTests\ is\ not\ very\ feasible\ at\ this\nScripts\ for\ \[\[test\]\]\ options\ like\ ''-setup'',\ ''-body'',\ and\ '--cleanup''\ are\nevaluated\ in\ the\ caller's\ scope.\ \ This\ is\ the\ same\ rule\ as\ for\ other\ control\nstructure\ commands\ like\ \[if\]\ or\ \[while\].\ \ Any\ command\ that\ takes\ a\ script\ as\ an\nargument\ and\ controls\ something\ about\ how\ that\ script\ is\ evaluated\ can\ be\nviewed\ as\ a\ kind\ of\ control\ structure.\ Another\ aspect\ of\ the\ control\ structure\nbehaviour\ of\ \[\[test\]\]\ is\ that\ '''-constraints''\ makes\ execution\ of\ other\ scripts\nconditional.\n\ntime,\ as\ it\ is\ used\ as\ a\ programmatic\ interface\ for\ sub-processes\ in\ \[runAllTests\].\n\n\n**\ Alternatives\ **\n\n\[New\ Test\ Package\]\n**\ Running\ tcltest\ **\n\[tcltap\],\ a\ simple\ alternative\ for\ the\ small\ test\n\n\[TTXN\]\ TclTest\ eXtended\ Notation\n\n\[Caius\]\ Functional\ testing\ framework\ based\ on\ \[ITcl\],\ \[Expect\]\ and\ \[Selenium\].\n\n\n\nTo\ run\ the\ Tcl\ source\ code\ test\ suite\ against\ another\ installed\ Tcl\ interpreter:\n\n======none\ntclsh\ all.tcl\n======\n\n\n\nSome\ commands\ specific\ for\ testing\ internals\ are\ in\ the\ `Tcltest`\ package\ (note:\ not\ `tcltest`),\ which\ is\ not\ built\ by\ default.\n`Tcltest`\ is\ not\ (yet?)\ available\ as\ an\ extension,\ so\ it\ needs\ to\ be\ built\ into\ a\ special\ `tcltest`\ executable\ with:\n\n======none\n\ \ \$\ make\ runtest\n\ \ \$\ ./tcltest\n\ \ %\ package\ require\ Tcltest\n\ \ 8.6.2\n\ \ %\ llength\ \[info\ commands\ test*\]\n\ \ 85\nThese\ commands\ include\ `testparser`,\ mentioned\ elsewhere\ on\ the\ wiki\ (though\ \[tclparser\]\ provides\ an\ alternative\ as\ a\ loadable\ extension).\nThese\ commands\ include\ \[testparser\],\ mentioned\ elsewhere\ on\ the\ wiki\ (though\ \[tclparser\]\ provides\ an\ alternative\ as\ a\ loadable\ extension).\n**\ Tutorials\ **\n\n|\ \[http://web.archive.org/web/20080804010056/www.tclscripting.com/articles/apr06/article2.html%|%Installing\ tcltest%|%\]\ |\[Bryan\ Oakley\],\ 2006.\ \ How\ to\ install\ tcltest\ |\n|\ \[http://web.archive.org/web/20080617153002/www.tclscripting.com/articles/apr06/article1.html%|%Getting\ started\ with\ tcltest%|%\]\ |\ by\ \[Bryan\ Oakley\],\ 2006.\ \ How\ to\ use\ tcltest\ |\n***\ Run\ a\ Tcl\ test\ in\ verbose\ mode\ ***\n**\ Examples\ **\nA\ wonderful\ addition\ to\ this\ page\ would\ be\ instructions\ on\ how\ to\ run\n\[How\ to\ write\ tcltest\ result\ values\]\n\[DGP\]\ answers:\n\[Your\ first\ tcltests\]\n======none\n***\ complex\ results\ ***\n\n\[RHS\]\ One\ way\ to\ handle\ tests\ that\ the\ ''-result''\ option\ can't\ handle\ is\ to\ do\ something\ like:\ntest\ mytest-1.1\ \{\n\ test\ mytest-1.1\ \{\n\ \ \ \ \ Calling\ my\ proc\ should\ always\ return\ a\ list\ of\ at\ least\ length\ 3\n\ \}\ -body\ \{\n\ \ \ \ \ set\ result\ \[myProc\ a\ b\ c\ d\ e\]\n\ \ \ \ \ #\ -result\ can't\ handle\ \{>=\ llength\ 3\},\ so\ we\ test\ it\ here\n\ \ \ \ \ expr\ \{\ \[llength\ \$result\]\ >=\ 3\ \}\n\ \}\ -result\ \{1\}\n\n\n----\n\[customMatch\]\ can\ also\ be\ used\ to\ the\ same\ effect:\ Define\ a\ script\ that\ compares\ a\ an\ actual\ result\ with\ a\ target\ result.\ \ Then\ use\ \[customMatch\]\ to\ \"register\"\ that\ script\ for\ the\ ''-match''\ option.\ \ The\ script\ should\ return\ a\ boolean\ option\ indicating\ match\ or\ no\ match.\n----\n**\ Other\ **\n\n\[A\ look\ at\ the\ Tcl\ test\ suite\ with\ gcov\]\n\n**\ Testimonials\ **\n\n\[VI\]\ :\ 2003/10/02.\ \ We\ at\ \[http://www.comit.com\]\ use\ Tcl\ (and\ Tk)\ extensively.\nWe\ use\ Tcl\ for\ hardware\ testing\ in\ simulation\ (think\ multimillion-gate,\nmultifunction\ asic\ verification).\ \ One\ of\ the\ major\ factors\ in\ our\ initial\ndecision\ to\ use\ Tcl\ and\ our\ continuing\ to\ use\ tcl\ is\ tcltest.\ \ \ We\ use\ most\ntcltest\ features\ including\ constraints\ and\ are\ very\ pleased\ with\ the\ easy\nconfiguration\ of\ tests\ and\ the\ reporting.\ \ I\ do\ have\ gripes,\ but\ relatively\nminor,\ and\ since\ it\ is\ pure\ Tcl,\ we\ can\ change\ it\ anyways..\n\n\n\[PYK\]\ 2015-04-09:\ \ One\ strategy\ for\ some\ complex\ tests\ is\ to\ set\ `-result`\ to\n\n<<discussion>>\n\n\nA\ wonderful\ addition\ to\ this\ page\ would\ be\ instructions\ on\ how\ to\ run\none\ particular\ test,\ using\ verbose\ mode,\ for\ the\ purpose\ of\ reporting\ntest\ suite\ failures\ to\ a\ package\ developer.\n\[\[A\ Pythoneer\ has\ written\ an\ article--which\n\[DGP\]\ answers:\n\n\ make\ TESTFLAGS='-verbose\ tpse\ -file\ safe.test'\ test\n\n----\n\[CL\]\ can\ locate\ if\ helpful--illustrating\ use\ of\ PyUnit\ with\ Roman\ numeral\ conversion.\nIn\ the\ absence\ of\ any\ other\ inspiration,\nmaybe\ someone\ wants\ to\ steal\ that\ example\ ...\]\]\ \n\n\[RS\],\ off\ page\ topic:\ See\ also\ \[Roman\ numbers\]\ for\ Tcl\ routines.\n\n----\n\[AK\]:\nMost\ modules\ in\ \[tcllib\]\ come\ with\ .test\ files\ using\ tcltest\nfor\ regression\ testing.\n\n\[davidw\]\ 2003-10-03:\ I\ am\ doing\ some\ work\ to\ improve\ tcltest,\ specifically\ to\ give\ it\ an\ API\ so\ that\ you\ can\ programmatically\ fetch\ information\ about\ the\ test\ results.\ \ I\ would\ love\ to\ hear\ what\ sorts\ of\ features\ you\ would\ find\ useful\ -\ feel\ free\ to\ drop\ me\ email.\n\[davidw\]\ 2003/10/03:\ I\ am\ doing\ some\ work\ to\ improve\ tcltest,\ specifically\ to\ give\ it\ an\ API\ so\ that\ you\ can\ programmatically\ fetch\ information\ about\ the\ test\ results.\ \ I\ would\ love\ to\ hear\ what\ sorts\ of\ features\ you\ would\ find\ useful\ -\ feel\ free\ to\ drop\ me\ email.\n----\n\n\[disneylogic\]\ It\ would\ be\ useful\ to\ have\ a\ callback\ option,\ prefixed\ndetermine\ the\ correctness\ of\ a\ test.\ \ In\ lieu\ of\ demanding\ a\ real\ value\nto\ compare\ or\ abusing\ return\ codes,\ this\ would\ adjust\ 'tcltest'\ to\ perform\nmore\ like\ SUnit\ \[http://sourceforge.net/projects/sunit/\]\ in\ the\ Beck\ testing\ framework\ \[http://www.xprogramming.com/testfram.htm\].\n\nI\ encountered\ this\ when\ I\ was\ trying\ to\ write\ a\ routine\ to\ do\ sampling\ without\ replacement\ and\ could\ not\ specify\ a\ specific\ result\ to\ use\ to\ compare.\n\nIf\ there\ is\ already\ some\ way\ of\ doing\ this,\ please,\ please\ specify\ it\ here!\ \ I\ waded\ through\ the\ man\ page\ for\ a\ bit\ and\ couldn't\ find\ anything,\ particularly\ in\ the\ usage\ of\ 'test'\ section.\n\n\[DGP\]:\ Can\ you\ provide\ an\ example\ of\ what\ a\ test\n'''\[DGP\]'''\ Can\ you\ provide\ an\ example\ of\ what\ a\ test\nfor\ `test`\ ?\ \ Assume\ the\ reader\ knows\ nothing\ about\nfor\ \[test\]\ ?\ \ Assume\ the\ reader\ knows\ nothing\ about\n\n----\n\n\[LV\]:\ I\ have\ a\ programming\ ''itch''\ and\ am\ wondering\ if\ tcltest\ will\ help\ me\ scratch\ this\ itch.\n\[LV\]\ I\ have\ a\ programming\ ''itch''\ and\ am\ wondering\ if\ tcltest\ will\ help\ me\ scratch\ this\ itch.\nProblem:\ set\ up\ regression\ testing\ of\ a\ client/server\ command\ line\ and\ stdout/return\ code\ related\ pair\ of\ applications.\n\nCurrently,\ I'd\ love\ to\ find\ some\ help,\ tutorials,\ examples,\ etc.\ of\ how\ others\ are\ successfully\ doing\ this\ sort\ of\ thing\ with\ the\ result\ being\ test\ cases\ that\ are\ nearly\ trivial\ to\ read\ and\ write.\ I'd\ like\ to\ '''not'''\ have\ to\ teach\ people\ all\ of\ tcl\ before\ they\ can\ write\ new\ test\ cases.\ \ Ideally,\ having\ a\ half\ dozen\ or\ so\ examples\ should\ provide\ enough\ context\ to\ write\ additional\ code.\ \n\nI'd\ also\ like\ suggestions\ for\ '''best\ practices'''\ relating\ to\ this\ sort\ of\ use\ of\ tcltest.\n\nThanks!\n\n----\n\n\[fermulator\]:\ If\ a\ particular\ test\ spews\ out\ a\ bunch\ of\ debug\ information\ (i.e.\ 'test\ debug\ mode'),\ is\ there\ a\ way\ to\ redirect\ stdout,\ for\ a\ specific\ test,\ to\ /dev/null?\ \ I\ can't\ seem\ to\ find\ a\ way\ to\ hide\ stdout.\ \ It's\ basically:\n\[fermulator\]\ If\ a\ particular\ test\ spews\ out\ a\ bunch\ of\ debug\ information\ (i.e.\ 'test\ debug\ mode'),\ is\ there\ a\ way\ to\ redirect\ stdout,\ for\ a\ specific\ test,\ to\ /dev/null?\ \ I\ can't\ seem\ to\ find\ a\ way\ to\ hide\ stdout.\ \ It's\ basically:\n\n======\ntest\ print_debug_true\ \{\ntest\ print_debug_true\ \\\n\{\n\ \ \ \ work\ as\ expected\ (no\ errors\ are\ caught).\n\}\ -setup\ \{\n\}\ \\\n-setup\ \\\n\{\n\ \ \ \ \$myObj\ setDebug\ true\n\}\ -body\ \{\n\}\ \\\n-body\ \\\n\{\n\ \ \ \ #\ If\ it\ fails,\ error\ out,\ else\ return\ PASS.\n\ \ \ \ if\ \{\ \[catch\ \{\$myObj\ doStuff\}\ err\]\ \}\ \{\n\ \ \ \ if\ \{\ \[catch\ \{\$myObj\ doStuff\}\ err\]\ \}\ \\\n\ \ \ \ \{\n\ \ \ \ \}\n\ \ \ \ return\ PASS\n\}\ -result\ \{PASS\}\n\}\ \\\n-result\ \{PASS\}\n\nWhen\ I\ run\ the\ above\ test,\ stdout\ on\ the\ test\ output\ gets\ spammed\ with\ a\ whack\ of\ debug\ information,\ and\ it\ \"skews\"\ the\ high\ level\ view\ of\ which\ tests\ are\ running,\ passing,\ failing,\ etc.\n\n\n<<discussion>>\n\n<<categories>>\ Testing\ |\ Package\ |\ Command\ |\ Tcl\ |\ \ Arts\ and\ crafts\ of\ Tcl-Tk\ programming\n<<categories>>\ Testing\ |\ Package\ |\ Command\ |\ Tcl\ |\ \ Tcl\ syntax\ help\ |\ Arts\ and\ crafts\ of\ Tcl-Tk\ programming} CALL {my revision tcltest} CALL {::oo::Obj5075883 process revision/tcltest} CALL {::oo::Obj5075881 process}

-errorcode

NONE

-errorinfo

Unknow state transition: LINE -> END
    while executing
"error $msg"
    (class "::Wiki" method "render_wikit" line 6)
    invoked from within
"my render_$default_markup $N $C $mkup_rendering_engine"
    (class "::Wiki" method "render" line 8)
    invoked from within
"my render $name $C"
    (class "::Wiki" method "revision" line 31)
    invoked from within
"my revision $page"
    (class "::Wiki" method "process" line 56)
    invoked from within
"$server process [string trim $uri /]"

-errorline

4