Skip to content

Commit

Permalink
Add encoding test cases from sporkmonger/addressable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Fletcher committed Mar 13, 2009
1 parent 1e4b3c5 commit 2646823
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/idna_A
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% cf. http://github.com/sporkmonger/addressable (spec/addressable/idna_spec.rb)

{input, "\350\251\271\345\247\206\346\226\257"}.

{output, "xn--8ws00zhy3a"}.
5 changes: 5 additions & 0 deletions test/idna_B
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% cf. http://github.com/sporkmonger/addressable (spec/addressable/idna_spec.rb)

{input, "www.I\303\261t\303\253rn\303\242ti\303\264n\303\240liz\303\246ti\303\270n.com"}.

{output, "www.xn--itrntinliztin-vdb0a5exd8ewcye.com"}.
5 changes: 5 additions & 0 deletions test/idna_C
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% cf. http://github.com/sporkmonger/addressable (spec/addressable/idna_spec.rb)

{input, "www.In\314\203te\314\210rna\314\202tio\314\202na\314\200liz\303\246ti\303\270n.com"}.

{output, "www.xn--itrntinliztin-vdb0a5exd8ewcye.com"}.
5 changes: 5 additions & 0 deletions test/idna_D
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% cf. http://github.com/sporkmonger/addressable (spec/addressable/idna_spec.rb)

{input, "www.\343\201\273\343\202\223\343\201\250\343\201\206\343\201\253\343\201\252\343\201\214\343\201\204\343\202\217\343\201\221\343\201\256\343\202\217\343\201\213\343\202\211\343\201\252\343\201\204\343\201\251\343\202\201\343\201\204\343\202\223\343\202\201\343\201\204\343\201\256\343\202\211\343\201\271\343\202\213\343\201\276\343\201\240\343\201\252\343\201\214\343\201\217\343\201\227\343\201\252\343\201\204\343\201\250\343\201\237\343\202\212\343\201\252\343\201\204.w3.mag.keio.ac.jp"}.

{output, "www.xn--n8jaaaaai5bhf7as8fsfk3jnknefdde3fg11amb5gzdb4wi9bya3kc6lra.w3.mag.keio.ac.jp"}.
5 changes: 5 additions & 0 deletions test/idna_E
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% cf. http://github.com/sporkmonger/addressable (spec/addressable/idna_spec.rb)

{input, "\347\202\271\345\277\203\345\222\214\347\203\244\351\270\255.w3.mag.keio.ac.jp"}.

{output, "xn--0trv4xfvn8el34t.w3.mag.keio.ac.jp"}.
5 changes: 5 additions & 0 deletions test/idna_F
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% cf. http://github.com/sporkmonger/addressable (spec/addressable/idna_spec.rb)

{input, "\352\260\200\352\260\201\352\260\202\352\260\203\352\260\204\352\260\205\352\260\206\352\260\207\352\260\210\352\260\211\355\236\242\355\236\243.com"}.

{output, "xn--o39acdefghijk5883jma.com"}.
5 changes: 5 additions & 0 deletions test/idna_G
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% cf. http://github.com/sporkmonger/addressable (spec/addressable/idna_spec.rb)

{input, "\347\242\274\346\250\231\346\272\226\350\220\254\345\234\213\347\242\274.com"}.

{output, "xn--9cs565brid46mda086o.com"}.
5 changes: 5 additions & 0 deletions test/idna_H
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% cf. http://github.com/sporkmonger/addressable (spec/addressable/idna_spec.rb)

{input, "\357\276\230\345\256\240\355\220\261\343\200\271.com"}.

{output, "xn--eek174hoxfpr4k.com"}.
5 changes: 5 additions & 0 deletions test/idna_I
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% cf. http://github.com/sporkmonger/addressable (spec/addressable/idna_spec.rb)

{input, "\343\203\252\345\256\240\355\220\261\345\215\204.com"}.

{output, "xn--eek174hoxfpr4k.com"}.
5 changes: 5 additions & 0 deletions test/idna_J
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% cf. http://github.com/sporkmonger/addressable (spec/addressable/idna_spec.rb)

{input, "\341\206\265"}.

{output, "xn--4ud"}.
5 changes: 5 additions & 0 deletions test/idna_K
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
% cf. http://github.com/sporkmonger/addressable (spec/addressable/idna_spec.rb)

{input, "\357\276\257"}.

{output, "xn--4ud"}.

0 comments on commit 2646823

Please sign in to comment.