root/Convert-RACE/trunk/t/01base32.t

Revision 27 (checked in by miyagawa, 19 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 use strict;
2 use Test;
3 BEGIN { plan tests => 4 }
4
5 use Convert::Base32 qw(encode_base32 decode_base32);
6
7 my $str1 = "\x3a\x27\x0f\x93";
8 my $str2 = "\x3a\x27\x0f\x93\x2a";
9
10 my $enc1 = 'hitq7ey';
11 my $enc2 = 'hitq7ezk';
12
13 ok(encode_base32($str1), $enc1);
14 ok(encode_base32($str2), $enc2);
15
16 ok(decode_base32($enc1), $str1);
17 ok(decode_base32($enc2), $str2);
Note: See TracBrowser for help on using the browser.