diff options
author | alandonovan <adonovan@google.com> | 2018-02-26 10:40:44 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-26 10:40:44 -0500 |
commit | c51a9a08f60d1ea908ef78dbfbb58e901fb58bed (patch) | |
tree | 60bdd6483af5a7c16c4aa1bd7b7845200a3f0c67 | |
parent | 28ceca7fdc8d88c4b6a4a64453b2251e00f73f56 (diff) | |
download | starlark-go-c51a9a08f60d1ea908ef78dbfbb58e901fb58bed.tar.gz |
testdata/string: add len testcase (#68)
-rw-r--r-- | testdata/string.sky | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/testdata/string.sky b/testdata/string.sky index f92dadf..9ffebe7 100644 --- a/testdata/string.sky +++ b/testdata/string.sky @@ -26,6 +26,7 @@ assert.fails(lambda: 1.0 * "abc", "unknown.*float \\* str") # len assert.eq(len("Hello, δΈη!"), 14) +assert.eq(len("π·"), 4) # U+10437 has a 4-byte UTF-8 encoding (and a 2-code UTF-16 encoding) # chr & ord assert.eq(chr(65), "A") # 1-byte UTF-8 encoding |