Weblog entry #100 for Steve

Weblog bugfixes
Posted by Steve on Sun 23 Apr 2006 at 14:11
Tags: ,

There were a few corner cases in the handling of weblog entries which were not tested as properly as they should have been.

The two obvious bugs were:

  • When adding a new entry the previous one didn't get its navigation update - so it didn't contain a link to the new "Next >>" entry.
  • Weblog entry deletion failed. (Rather it worked, but gave an error instead of the "success page".)

These have now been fixed. Thanks to the Yawns::Weblog test case I can be sure these errors will not reappear.

(The test output may make interesting reading if you're interested in this level of detail of the sites code.)

When I fix things like this I'm pleased I started down the path of test-driven coding. It is just so much more satisfying to know that you've got things working, and provably so.

Incidently I learnt there is a simple command line program to run Perl test cases called "prove". Run it like this:

skx@itchy:~/debian-administration$ prove tests/
tests/add-no-follow.................ok                                       
tests/breakup-text..................ok                                       
tests/html-balance..................ok                                       
tests/html-filter...................ok                                       
tests/html-linkify..................
...
snip

You can also run it verbosely ("prove --verbose tests/") and cause it to randomize the order of the test cases execution ("prove --shuffle tests/"). See the manpage for more details.

 

Comments on this Entry

Posted by eric (82.253.xx.xx) on Thu 27 Apr 2006 at 19:55
[ Send Message | View Weblogs ]
I just want to tell you that in the user 'Options' page, there is spelling mistake (or a 'typing' mistake) : 'recieve' and not 'receive'. my 2 cts.

:eric:
http://blog.sietch-tabr.com

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Thu 27 Apr 2006 at 19:59
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Thanks for the report. It is fixed now.

(Looks like there was an identical typo on another page too.

Steve

[ Parent | Reply to this comment ]

Posted by eric (82.253.xx.xx) on Thu 27 Apr 2006 at 20:01
[ Send Message | View Weblogs ]
waouh... very fast :)

:eric:
http://blog.sietch-tabr.com

[ Parent | Reply to this comment ]

Posted by Steve (212.20.xx.xx) on Fri 28 Apr 2006 at 09:21
[ Send Message | View Steve's Scratchpad | View Weblogs ]

I'd just got home and was in front of the computer!

Steve

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search