]> gitweb.factorcode.org Git - factor.git/blob - basis/io/encodings/string/string-tests.factor
Switch to https urls
[factor.git] / basis / io / encodings / string / string-tests.factor
1 ! Copyright (C) 2008 Daniel Ehrenberg.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: strings io.encodings.utf8 io.encodings.utf16
4 io.encodings.string tools.test io.encodings.binary ;
5
6 { "hello" } [ "hello" utf8 decode ] unit-test
7 { B{ 0 1 22 255 } } [ B{ 0 1 22 255 } binary decode ] unit-test
8 { "he" } [ "\0h\0e" utf16be decode ] unit-test
9
10 { "hello" } [ "hello" utf8 encode >string ] unit-test
11 { "\0h\0e" } [ "he" utf16be encode >string ] unit-test