Comparison

tests/test_sasl.lua @ 4194:7cc041710106

tests/test_sasl.lua: Convert literal UTF-8/Latin1 chars to escape codes for weak text editors
author Matthew Wild <mwild1@gmail.com>
date Tue, 22 Feb 2011 21:19:00 +0000
parent 3540:bc139431830b
child 5776:bd0ff8ae98a8
comparison
equal deleted inserted replaced
4193:3fecfe58d633 4194:7cc041710106
3 -- Copyright (C) 2008-2010 Waqas Hussain 3 -- Copyright (C) 2008-2010 Waqas Hussain
4 -- 4 --
5 -- This project is MIT/X11 licensed. Please see the 5 -- This project is MIT/X11 licensed. Please see the
6 -- COPYING file in the source package for more information. 6 -- COPYING file in the source package for more information.
7 -- 7 --
8
9
10 --- WARNING! ---
11 -- This file contains a mix of encodings below.
12 -- Many editors will unquestioningly convert these for you.
13 -- Please be careful :( (I recommend Scite)
14 ---------------------------------
15 8
16 local gmatch = string.gmatch; 9 local gmatch = string.gmatch;
17 local t_concat, t_insert = table.concat, table.insert; 10 local t_concat, t_insert = table.concat, table.insert;
18 local to_byte, to_char = string.byte, string.char; 11 local to_byte, to_char = string.byte, string.char;
19 12
39 end 32 end
40 33
41 assert_utf8("", "") 34 assert_utf8("", "")
42 assert_utf8("test", "test") 35 assert_utf8("test", "test")
43 assert_utf8(nil, nil) 36 assert_utf8(nil, nil)
44 assert_utf8("foobar.råkat.se", "foobar.rÃ¥kat.se") 37 assert_utf8("foobar.r\229kat.se", "foobar.r\195\165kat.se")
45 end 38 end