User:Luasóg bot/Exclusion compliant

Test script
The following test script uses User:Anomie's bot exclusion test cases. (Don't forget to add the allowBots function from above.)

Results
The following output shows a 100% pass rate for the allowBots function on User:Anomie's bot exclusion test cases.

Test Case 1:

This page should not be editable, as it has "" Result: Not allowed --- Test Case 2:

This page should be editable, does nothing Result: Allowed --- Test Case 3:

This page should be editable, all bots explicitly allowed Result: Allowed --- Test Case 4:

This page should not be editable, no bots allowed Result: Not allowed --- Test Case 5:

This page should be editable, ExampleBot is specifically allowed Result: Allowed --- Test Case 6:

This page should not be editable, only bot "foo" is allowed Result: Not allowed --- Test Case 7:

This page should not be editable, all bots denied Result: Not allowed --- Test Case 8:

This page should be editable, no bots denied Result: Allowed --- Test Case 9:

This page should not be editable, ExampleBot specifically denied Result: Not allowed --- Test Case 10:

This page should be editable, only bot "foo" is denied Result: Allowed --- Test Case 11:

This page should not be editable if the bot honors any optout code; if the bot does not honor any optout code, this page may or may not be editable Result: Not allowed --- Test Case 12:

This page should not be editable if the bot honors the "ifd" optout code, otherwise it should be editable Result: Allowed --- Test Case 13: This page should not be editable, as it has Result: Not allowed --- Test Case 14:

This page should be editable, as it has no bot control template Result: Allowed --- Test Case 15:

This page should not be editable, as both ExampleBot and bot "bar" are specifically denied Result: Not allowed --- Test Case 16:

This page should not be editable, as ExampleBot, bot "foo", and bot "bar" are specifically denied Result: Not allowed --- Test Case 17:

This page should not be editable, as both ExampleBot and bot "foo" are specifically denied Result: Not allowed --- Test Case 18:

This page should be editable, as both ExampleBot and bot "bar" are specifically allowed Result: Allowed --- Test Case 19:

This page should be editable, as ExampleBot, bot "foo", and bot "bar" are specifically allowed Result: Allowed --- Test Case 20:

This page should be editable, as both ExampleBot and bot "foo" are specifically allowed Result: Allowed --- Test Case 21:

This page should be editable, as only "ExampleBot II" is denied Result: Allowed --- Test Case 22:

This page should not be editable, as only "ExampleBot II" is allowed Result: Not allowed --- Test Case 23: This page should be editable, as it has no bot control templates (and, in fact, no templates at all) Result: Allowed --- Test Case 24:

This page should not be editable, although it technically doesn't follow the specification by having spaces around the bot names Result: Not allowed --- Test Case 25:

This page should not be editable, although it technically doesn't follow the specification by having spaces around the bot names Result: Not allowed --- Test Case 26:

This page should be editable, although it technically doesn't follow the specification by having spaces around the bot names Result: Allowed --- Test Case 27:

This page should be editable, although it technically doesn't follow the specification by having spaces around the bot names Result: Allowed --- Test Case 28:

This page should not be editable, although it technically doesn't follow the specification by having newlines around the bot names Result: Not allowed --- Test Case 29:

This page should not be editable, although it technically doesn't follow the specification by having newlines around the bot names Result: Not allowed --- Test Case 30:

This page should be editable, although it technically doesn't follow the specification by having newlines around the bot names Result: Allowed --- Test Case 31:

This page should be editable, although it technically doesn't follow the specification by having newlines around the bot names Result: Allowed --- Test Case 32: ,ExampleBot,

This page should not be editable, as only bot "foo" is allowed ("ExampleBot" is outside the template) Result: Not allowed --- Test Case 33: ,ExampleBot,

This page should be editable, as only bot "foo" is denied ("ExampleBot" is outside the template) Result: Allowed