diff options
author | intrigeri <intrigeri@boum.org> | 2009-01-13 12:26:43 +0100 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2009-01-13 12:26:43 +0100 |
commit | 82197bd0eaa216b841caace38c976acc7f6ad3fa (patch) | |
tree | 450f4afafb26d17a54c4917fb20d067c24efcaf7 /t | |
parent | c8e3136d0091bd024e6dc1f3c21a10a92f2017d4 (diff) | |
parent | 7b1026b1a803e160c360ee8f4d19004b466f8b7c (diff) |
Merge commit 'upstream/master' into prv/po
Diffstat (limited to 't')
-rwxr-xr-x | t/yesno.t | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/yesno.t b/t/yesno.t new file mode 100755 index 000000000..60a8c071d --- /dev/null +++ b/t/yesno.t @@ -0,0 +1,21 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Test::More tests => 10; + +BEGIN { use_ok("IkiWiki"); } + +# note: yesno always accepts English even if localized. +# So no need to bother setting locale to C. + +ok(IkiWiki::yesno("yes") == 1); +ok(IkiWiki::yesno("Yes") == 1); +ok(IkiWiki::yesno("YES") == 1); + +ok(IkiWiki::yesno("no") == 0); +ok(IkiWiki::yesno("No") == 0); +ok(IkiWiki::yesno("NO") == 0); + +ok(IkiWiki::yesno("1") == 1); +ok(IkiWiki::yesno("0") == 0); +ok(IkiWiki::yesno("mooooooooooo") == 0); |