<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-6974165229791814643.post493938231486061638..comments</id><updated>2010-02-14T20:13:39.590-05:00</updated><title type='text'>Comments on Rhino and other beasts: Doctest in Rhino</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.norrisboyd.com/feeds/493938231486061638/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6974165229791814643/493938231486061638/comments/default'/><link rel='alternate' type='text/html' href='http://blog.norrisboyd.com/2008/03/doctest-in-rhino.html'/><author><name>Norris Boyd</name><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6974165229791814643.post-1778384966555822511</id><published>2009-08-19T08:48:03.656-04:00</published><updated>2009-08-19T08:48:03.656-04:00</updated><title type='text'>tschaub: Have you looked at org.mozilla.javascript...</title><content type='html'>tschaub: Have you looked at org.mozilla.javascript.tests.DoctestsTest? This is a JUnit test that calls runDoctest. Does that do what you want?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6974165229791814643/493938231486061638/comments/default/1778384966555822511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6974165229791814643/493938231486061638/comments/default/1778384966555822511'/><link rel='alternate' type='text/html' href='http://blog.norrisboyd.com/2008/03/doctest-in-rhino.html?showComment=1250686083656#c1778384966555822511' title=''/><author><name>Norris Boyd</name><uri>http://www.blogger.com/profile/08131386886130449637</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06019650675286808201'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.norrisboyd.com/2008/03/doctest-in-rhino.html' ref='tag:blogger.com,1999:blog-6974165229791814643.post-493938231486061638' source='http://www.blogger.com/feeds/6974165229791814643/posts/default/493938231486061638' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6974165229791814643.post-885266856311158387</id><published>2009-08-18T23:15:31.878-04:00</published><updated>2009-08-18T23:15:31.878-04:00</updated><title type='text'>Can doctest be run in another scope?  I can't figu...</title><content type='html'>Can doctest be run in another scope?  I can&amp;#39;t figure out how to get at runDoctest from the shell, but I think that provides what I would like to do (basically, run doctest without polluting global - and call it multiple times with the same scope).  Thanks for any tips.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6974165229791814643/493938231486061638/comments/default/885266856311158387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6974165229791814643/493938231486061638/comments/default/885266856311158387'/><link rel='alternate' type='text/html' href='http://blog.norrisboyd.com/2008/03/doctest-in-rhino.html?showComment=1250651731878#c885266856311158387' title=''/><author><name>tschaub</name><uri>http://www.blogger.com/profile/12243618766226981189</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.norrisboyd.com/2008/03/doctest-in-rhino.html' ref='tag:blogger.com,1999:blog-6974165229791814643.post-493938231486061638' source='http://www.blogger.com/feeds/6974165229791814643/posts/default/493938231486061638' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6974165229791814643.post-3227323131030453402</id><published>2009-06-17T21:45:46.369-04:00</published><updated>2009-06-17T21:45:46.369-04:00</updated><title type='text'>tschaub: You're right that true and "true" print t...</title><content type='html'>tschaub: You&amp;#39;re right that true and &amp;quot;true&amp;quot; print the same. I&amp;#39;ll often write my doctests to print out the value &lt;i&gt;and&lt;/i&gt; the type:&lt;br /&gt;&lt;br /&gt;js&amp;gt; function f() { return true; }&lt;br /&gt;js&amp;gt; var x = f();&lt;br /&gt;js&amp;gt; x&lt;br /&gt;true&lt;br /&gt;js&amp;gt; typeof x&lt;br /&gt;boolean&lt;br /&gt;&lt;br /&gt;Beyond that, it would be generally useful to have a more descriptive output format for the shell; perhaps a special global function that, if defined, will be called to print the results of each expression on the command line (similar to the prompts variable now).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6974165229791814643/493938231486061638/comments/default/3227323131030453402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6974165229791814643/493938231486061638/comments/default/3227323131030453402'/><link rel='alternate' type='text/html' href='http://blog.norrisboyd.com/2008/03/doctest-in-rhino.html?showComment=1245289546369#c3227323131030453402' title=''/><author><name>Norris Boyd</name><uri>http://www.blogger.com/profile/08131386886130449637</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06019650675286808201'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.norrisboyd.com/2008/03/doctest-in-rhino.html' ref='tag:blogger.com,1999:blog-6974165229791814643.post-493938231486061638' source='http://www.blogger.com/feeds/6974165229791814643/posts/default/493938231486061638' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6974165229791814643.post-4301795637956067437</id><published>2009-06-17T18:39:02.773-04:00</published><updated>2009-06-17T18:39:02.773-04:00</updated><title type='text'>This is cool.  Will future versions of rhino disti...</title><content type='html'>This is cool.  Will future versions of rhino distinguish between &amp;#39;true&amp;#39; and true in console output (or [&amp;#39;foo&amp;#39;] and &amp;#39;foo&amp;#39; etc.)?  Seems like that would make these tests more useful.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6974165229791814643/493938231486061638/comments/default/4301795637956067437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6974165229791814643/493938231486061638/comments/default/4301795637956067437'/><link rel='alternate' type='text/html' href='http://blog.norrisboyd.com/2008/03/doctest-in-rhino.html?showComment=1245278342773#c4301795637956067437' title=''/><author><name>tschaub</name><uri>http://tschaub.myopenid.com/</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.norrisboyd.com/2008/03/doctest-in-rhino.html' ref='tag:blogger.com,1999:blog-6974165229791814643.post-493938231486061638' source='http://www.blogger.com/feeds/6974165229791814643/posts/default/493938231486061638' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6974165229791814643.post-1724481836464609266</id><published>2009-02-04T20:44:00.000-05:00</published><updated>2009-02-04T20:44:00.000-05:00</updated><title type='text'>Here's a link to JDoctest, based on your Rhino wor...</title><content type='html'>Here's a link to &lt;A HREF="http://cscott.net/Projects/JDoctest/" REL="nofollow"&gt;JDoctest&lt;/A&gt;, based on your Rhino work.  Thanks again!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6974165229791814643/493938231486061638/comments/default/1724481836464609266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6974165229791814643/493938231486061638/comments/default/1724481836464609266'/><link rel='alternate' type='text/html' href='http://blog.norrisboyd.com/2008/03/doctest-in-rhino.html?showComment=1233798240000#c1724481836464609266' title=''/><author><name>C. Scott Ananian</name><uri>http://www.blogger.com/profile/07906690430159974949</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.norrisboyd.com/2008/03/doctest-in-rhino.html' ref='tag:blogger.com,1999:blog-6974165229791814643.post-493938231486061638' source='http://www.blogger.com/feeds/6974165229791814643/posts/default/493938231486061638' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6974165229791814643.post-616829093279641343</id><published>2009-02-04T19:15:00.000-05:00</published><updated>2009-02-04T19:15:00.000-05:00</updated><title type='text'>I'm using this to implement a @doc.test tag for ja...</title><content type='html'>I'm using this to implement a @doc.test tag for javadoc, and it's very nice -- thank you!&lt;BR/&gt;&lt;BR/&gt;One minor issue: it's hard to write doc tests that are *supposed* to throw exceptions.  I can't set the error reporter in the context, since Global.runDoctest overrides it.  I *suspect* that ToolErrorReporter.reportException(RhinoException) should invoke we.getWrappedException().printStackTrace(err) instead of we.printStackTrace(err)?  That gives me the actual Java exception involved -- and then Global.doctestOutputMatches would need to implement either &lt;A HREF="http://docs.python.org/library/doctest.html#doctest.ELLIPSIS" REL="nofollow"&gt;doctest.ELLIPSIS&lt;/A&gt; or &lt;A HREF="http://docs.python.org/library/doctest.html#doctest.IGNORE_EXCEPTION_DETAIL" REL="nofollow"&gt;doctest.IGNORE_EXCEPTION_DETAIL&lt;/A&gt; to allow the body of the stack trace to be elided.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6974165229791814643/493938231486061638/comments/default/616829093279641343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6974165229791814643/493938231486061638/comments/default/616829093279641343'/><link rel='alternate' type='text/html' href='http://blog.norrisboyd.com/2008/03/doctest-in-rhino.html?showComment=1233792900000#c616829093279641343' title=''/><author><name>C. Scott Ananian</name><uri>http://www.blogger.com/profile/07906690430159974949</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.norrisboyd.com/2008/03/doctest-in-rhino.html' ref='tag:blogger.com,1999:blog-6974165229791814643.post-493938231486061638' source='http://www.blogger.com/feeds/6974165229791814643/posts/default/493938231486061638' type='text/html'/></entry></feed>