File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
use Test ;
2
2
3
- plan 14 ;
3
+ plan 15 ;
4
4
5
5
ok Encoding::Registry. find(' utf8' ) ~~ Encoding, ' Can find built-in utf8 encoding' ;
6
6
ok Encoding::Registry. find(' utf-8' ) ~~ Encoding, ' Can find built-in utf-8 encoding' ;
@@ -53,3 +53,13 @@ throws-like { Encoding::Registry.find('utf-29') },
53
53
X::Encoding::AlreadyRegistered , name => ' prime-enc' ,
54
54
' Cannot register an encoding with an overlapping alternative name' ;
55
55
}
56
+
57
+ {
58
+ my class NoAlternativeNamesEncoding does Encoding {
59
+ method name () { " this-encoding-not-taken" }
60
+ method encoder () { die " NYI" }
61
+ method decoder () { die " NYI" }
62
+ }
63
+ lives-ok { Encoding::Registry. register(NoAlternativeNamesEncoding) },
64
+ " Encodings with no alternative names method can be registered" ;
65
+ }
You can’t perform that action at this time.
0 commit comments