Aegisub/aegisub/automation/tests/unicode-test.lua
Amar Takhar a067bd560d SVN Transition Step 3/7
1. cd aegisub/
  2. svn mv *cpp *h src/
  3. svn mv Makefile.am MatroskaParser.c auto4_perldata.inc bitmaps boost \
     changelog.txt config gl include libosxutil libresrc md5.c msvc mythes.cxx \
     mythes.hxx res.rc src/
  4. cd ..
  5. svn mv FFmpegSource2/ INSTALL Makefile.am README  acinclude.m4 \
     autogen.sh automation/ bin build configure.in desktop dummy.txt lib \
     libass/ m4macros/ packages/ po/ scripts/ universalchardet/ aegisub/
  6. mkdir -p docs/wiki_convert
  7. svn add docs/wiki_convert
  8. cd docs
  9. svn mv aegisub_convert_docs.pl convert.bat output wiki_convert/

* See r2749 for full description.

Originally committed to SVN as r2752.
2009-03-08 08:30:39 +00:00

30 lines
903 B
Lua

-- Automation 4 test file
-- Test the unicode.lua include
script_name = "Automation 4 test 7"
script_description = "Test unicode.lua include"
script_author = "Niels Martin Hansen"
script_version = "1"
include("unicode.lua")
function test8(subtitles, selected_lines, active_line)
local s = "ōkii テスト aåDŽਵ℡랩ム﹌"
aegisub.debug.out("Test string is: " .. s .. "\n")
aegisub.debug.out("Width of first character is: " .. unicode.charwidth(s, 1) .. "\n")
local len = unicode.len(s)
aegisub.debug.out("Byte length is: " .. s:len() .. "\n")
aegisub.debug.out("Unicode length is: " .. len .. "\n")
for c, i in unicode.chars(s) do
local cp = unicode.codepoint(c)
aegisub.debug.out(string.format("Character %d is '%s' with codepoint %d\n", i, c, cp))
end
aegisub.debug.out("Done!")
end
aegisub.register_macro("Test Unicode", "Tests the Unicode include file", test8, nil)