factor/basis/io/encodings/string/string-tests.factor

12 lines
415 B
Factor
Raw Normal View History

! Copyright (C) 2008 Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
2008-03-05 20:12:40 -05:00
USING: strings io.encodings.utf8 io.encodings.utf16
io.encodings.string tools.test ;
2008-03-05 18:49:02 -05:00
IN: io.encodings.string.tests
2008-03-05 20:12:40 -05:00
[ "hello" ] [ "hello" utf8 decode ] unit-test
[ "he" ] [ "\0h\0e" utf16be decode ] unit-test
[ "hello" ] [ "hello" utf8 encode >string ] unit-test
[ "\0h\0e" ] [ "he" utf16be encode >string ] unit-test