User:Zachary/CalendarBot test-case

Here is the proposed test case for the CalendarBot (see here). The source code for the script that will complete this task is here (written in perl):

Category:January 1, 2005 (Currently protected)

 * No briefs
 * Interwiki links
 * Incorrect categorization and sorting

Current text
de:Kategorie:01.01.2005 es:Categoría:1 de enero de 2005 fr:Catégorie:1er janvier 2005 it:Categoria:1 gennaio 2005 pl:Kategoria:1 stycznia 2005 pt:Categoria:1 de Janeiro de 2005 ro:Categorie:1 ianuarie 2005 sv:Kategori:1 januari 2005

Expected output
de:Kategorie:01.01.2005 es:Categoría:1 de enero de 2005 fr:Catégorie:1er janvier 2005 it:Categoria:1 gennaio 2005 pl:Kategoria:1 stycznia 2005 pt:Categoria:1 de Janeiro de 2005 ro:Categorie:1 ianuarie 2005 sv:Kategori:1 januari 2005

Category:January 18, 2007

 * News briefs
 * No interwiki links
 * Correct categorization and sorting

Category:March 23, 2006

 * No briefs
 * Interwiki links
 * Correct categorization and sorting

Current text
de:Kategorie:23.03.2006 es:Categoría:23 de marzo de 2006 fr:Catégorie:23 mars 2006 it:Categoria:23 marzo 2006 pl:Kategoria:23 marca 2006 pt:Categoria:23 de Março de 2006 ro:Categorie:23 martie 2006 sv:Kategori:23 mars 2006

Expected output
de:Kategorie:23.03.2006 es:Categoría:23 de marzo de 2006 fr:Catégorie:23 mars 2006 it:Categoria:23 marzo 2006 pl:Kategoria:23 marca 2006 pt:Categoria:23 de Março de 2006 ro:Categorie:23 martie 2006 sv:Kategori:23 mars 2006

Category:June 6, 2006

 * No briefs
 * No interwiki links
 * Correct categorization, but incorrect sorting

Category:February 4, 2006 (Currently protected)

 * News briefs
 * Interwiki links
 * Correct categorization, but incorrect sorting

Current text
de:Kategorie:04.02.2006 es:Categoría:4 de febrero de 2006 fr:Catégorie:4 février 2006 it:Categoria:4 febbraio 2006 pl:Kategoria:4 lutego 2006 pt:Categoria:4 de Fevereiro de 2006 ro:Categorie:4 februarie 2006 sv:Kategori:4 februari 2006

Expected output
de:Kategorie:04.02.2006 es:Categoría:4 de febrero de 2006 fr:Catégorie:4 février 2006 it:Categoria:4 febbraio 2006 pl:Kategoria:4 lutego 2006 pt:Categoria:4 de Fevereiro de 2006 ro:Categorie:4 februarie 2006 sv:Kategori:4 februari 2006

TEST RESULTS (5 pass, 0 fail)

 * Category:January 1, 2005 (diff)
 * As expected, sorting was added to the category Category:January 1, and the category was removed from Category:2005 and added to Category:January 2005 with correct sorting. There are no briefs, so the was replaced by.


 * Category:January 18, 2007 (no diff)
 * As expected, there were no changes to this category. There are briefs, so the template was unchanged, and the sorting and categories were already correct.


 * Category:March 23, 2006 (diff)
 * As expected, the was replaced with  as there are no briefs.


 * Category:June 6, 2006 (diff)
 * As expected, sorting was fixed for Category:June 2006, and was replaced by  because there are no briefs.


 * Category:February 4, 2006 (diff)
 * As expected, sorting was fixed for Category:February 2006. The template remained the same because there are briefs.

Conclusion
In all circumstances, the bot performed its functions as expected, and without any problems.

The only functionality that remains untested on Wikinews is the ability to protect these categories older than a certain threshold (currently programmed as one month prior to today's date, but can easily be changed), which has been successfully tested on my test wiki, but was disabled when run here due to the lack of a sysop flag. If there is a consensus to protect the categories older than a certain threshold, and a consensus to allow this bot to do this, then this could be enabled, and, pending a second test to include this functionality, will be how this bot operates. Otherwise, the unprotection prior to run, and the reprotection after, would have to be done manually (unfortunately, it seems as though AWB does not support this).