Carp/test/unicode.carp
Jorge Acereda 9b08b6df3c Merge
2020-05-11 16:10:35 +02:00

25 lines
656 B
Plaintext

(use String)
(load "Test.carp")
(load "Array.carp")
(use Test)
(deftest test
(assert-equal test
&[\s \v \e \d \ä \n \g]
&(chars "svedäng")
"chars works as expected")
(assert-equal test
"svedäng"
&(from-chars &[\s \v \e \d \ä \n \g])
"from-chars works as expected")
(assert-equal test
&[\😀 \😀 \😀]
&(chars "😀😀😀")
"chars splits emoji")
(assert-equal test
"😀😀😀"
&(from-chars &[\😀 \😀 \😀])
"from-chars joins emoji")
)