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)
[edit]- No briefs
- Interwiki links
- Incorrect categorization and sorting
Current text
[edit]{{datecategory|January 1, 2005|December 31, 2004|January 2, 2005}} [[Category:2005|1-01]] [[Category:January 1]] [[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
[edit]{{datecategory nobriefs|January 1, 2005|December 31, 2004|January 2, 2005}} [[Category:January 2005|01]] [[Category:January 1|2005]] [[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]]
- News briefs
- No interwiki links
- Correct categorization and sorting
Current text
[edit]{{Datecategory|January 18, 2007|January 17, 2007|January 19, 2007}} [[Category:January 2007|18]] [[Category:January 18|2007]]
Expected output (no difference from existing text)
[edit]{{Datecategory|January 18, 2007|January 17, 2007|January 19, 2007}} [[Category:January 2007|18]] [[Category:January 18|2007]]
- No briefs
- Interwiki links
- Correct categorization and sorting
Current text
[edit]{{Datecategory|March 23, 2006|March 22, 2006|March 24, 2006}} [[Category:March 2006|23]] [[Category:March 23|2006]] [[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
[edit]{{Datecategory nobriefs|March 23, 2006|March 22, 2006|March 24, 2006}} [[Category:March 2006|23]] [[Category:March 23|2006]] [[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]]
- No briefs
- No interwiki links
- Correct categorization, but incorrect sorting
Current text
[edit]{{Datecategory|June 6, 2006|June 5, 2006|June 7, 2006}} [[Category:June 2006|6]] [[Category:June 6|2006]]
Expected output
[edit]{{Datecategory nobriefs|June 6, 2006|June 5, 2006|June 7, 2006}} [[Category:June 2006|06]] [[Category:June 6|2006]]
Category:February 4, 2006 (Currently protected)
[edit]- News briefs
- Interwiki links
- Correct categorization, but incorrect sorting
Current text
[edit]{{Datecategory|February 4, 2006|February 3, 2006|February 5, 2006}} [[Category:February 2006|4]] [[Category:February 4|2006]] [[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
[edit]{{Datecategory|February 4, 2006|February 3, 2006|February 5, 2006}} [[Category:February 2006|04]] [[Category:February 4|2006]] [[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)
[edit]- 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 {{Datecategory}} was replaced by {{Datecategory nobriefs}}.
- 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.
- As expected, the {{Datecategory}} was replaced with {{Datecategory nobriefs}} as there are no briefs.
- As expected, sorting was fixed for Category:June 2006, and {{Datecategory}} was replaced by {{Datecategory nobriefs}} because there are no briefs.
- As expected, sorting was fixed for Category:February 2006. The template remained the same because there are briefs.
Conclusion
[edit]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).