diff options
author | Rob Pike <r@golang.org> | 2008-07-07 14:07:46 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2008-07-07 14:07:46 -0700 |
commit | e67ffa4377582dc4183689a176560075b930a136 (patch) | |
tree | bc77d683442d0f051be4f2a98d3456297c9f2411 /test/string_lit.go | |
parent | 897278c03bb504aa82bdfa365c5132cbc5fb041e (diff) | |
download | go-e67ffa4377582dc4183689a176560075b930a136.tar.gz |
update to Unicode 5
SVN=126184
Diffstat (limited to 'test/string_lit.go')
-rw-r--r-- | test/string_lit.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/string_lit.go b/test/string_lit.go index f4f123c9c..9ef8f931d 100644 --- a/test/string_lit.go +++ b/test/string_lit.go @@ -75,5 +75,14 @@ func main() { `\000\123\x00\312\xFE\u0123\ubabe\U0000babe`, "backslashes 2 (backquote)"); assert("\\x\\u\\U\\", `\x\u\U\`, "backslash 3 (backquote)"); + + // test large runes. perhaps not the most logical place for this test. + var r int32; + r = 0x10ffff; // largest rune value + s = string(r); + assert(s, "\xf4\x8f\xbf\xbf", "largest rune"); + r = 0x10ffff + 1; + s = string(r); + assert(s, "\xef\xbf\xbd", "too-large rune"); sys.exit(ecode); } |