[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Testing LUA: verify the correctness of a UTF16 LUA port
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Thu, 15 Oct 2009 05:04:49 +0200
2009/10/15 uri cohen <email@example.com>:
> I was able to create a UTF16 port of LUA for windows, by following the
> guidelines I found at http://lua-users.org/lists/lua-l/2002-12/msg00021.html
> and the considerations from
> http://lua-users.org/lists/lua-l/2002-12/msg00025.html. This is a version of
> LUA where all internal strings are UTF16 (wide characters) rather than
> chars, not a version with two types of strings like LuaState.
> My question is on how can I verify my port works? Other than toy scripts I
> created, I'm looking for a comprehensive set of tests I can run in order to
> verify all important language feature were not broken...
I think you should make sure your "port" doesn't break libraries that
use strings for non-text data. For examples, you can try to use the io
library on binary files (use one of the (de)serialization libraries
available around), or LuaSocket on binary protocols.
By the way, what's the goal of such a modification of Lua ? If all you
need is being able to use Unicode filenames on windows, a simpler
approach is to assume filenames passed to Lua are in utf-8 format, and
convert it just when necessary when accessing the filesystem (in just
a very few places in Lua source code). I have a patch doing that if
anyone is interested.