Skip to content

Commit 94cae6e

Browse files
authored
reverse-string: Add unicode tests (#2367)
1 parent f906765 commit 94cae6e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

exercises/reverse-string/canonical-data.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,36 @@
5757
"value": "drawer"
5858
},
5959
"expected": "reward"
60+
},
61+
{
62+
"uuid": "1bed0f8a-13b0-4bd3-9d59-3d0593326fa2",
63+
"description": "wide characters",
64+
"scenarios": ["unicode"],
65+
"property": "reverse",
66+
"input": {
67+
"value": "子猫"
68+
},
69+
"expected": "猫子"
70+
},
71+
{
72+
"uuid": "93d7e1b8-f60f-4f3c-9559-4056e10d2ead",
73+
"description": "grapheme cluster with pre-combined form",
74+
"scenarios": ["unicode"],
75+
"property": "reverse",
76+
"input": {
77+
"value": "Würstchenstand"
78+
},
79+
"expected": "dnatsnehctsrüW"
80+
},
81+
{
82+
"uuid": "1028b2c1-6763-4459-8540-2da47ca512d9",
83+
"description": "grapheme clusters",
84+
"scenarios": ["unicode"],
85+
"property": "reverse",
86+
"input": {
87+
"value": "ผู้เขียนโปรแกรม"
88+
},
89+
"expected": "มรกแรปโนยขีเผู้"
6090
}
6191
]
6292
}

0 commit comments

Comments
 (0)