mirror of
				https://github.com/lunarmodules/luasocket.git
				synced 2025-10-31 10:25:55 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			513 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			513 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
| function test_dot(original, right)
 | |
|     local result, n = socket.smtp.dot(2, original)
 | |
|     assert(result == right, "->" .. result .. "<-")
 | |
|     print("ok")
 | |
| end
 | |
| 
 | |
| function test_stuff(original, right)
 | |
|     local result, n = socket.smtp.dot(2, original)
 | |
|     assert(result == right, "->" .. result .. "<-")
 | |
|     print("ok")
 | |
| end
 | |
| 
 | |
| test_dot("abc", "abc")
 | |
| test_dot("", "")
 | |
| test_dot("\r\n", "\r\n")
 | |
| test_dot("\r\n.", "\r\n..")
 | |
| test_dot(".\r\n.", "..\r\n..")
 | |
| test_dot(".\r\n.", "..\r\n..")
 | |
| test_dot("abcd.\r\n.", "abcd.\r\n..")
 |