view tests/test_util_random.lua @ 7264:6d97895c2bd7

util.dependencies: Show the full error when a symbol is not found (i.e., when running Prosody with the wrong version of Lua).
author Thijs Alkemade <me@thijsalkema.de>
date Thu, 10 Mar 2016 10:13:57 +0100
parents 32b74ad54432
children
line wrap: on
line source

-- Makes no attempt at testing how random the bytes are,
-- just that it returns the number of bytes requested

function bytes(bytes)
	assert_is(bytes(16));

	for i = 1, 255 do
		assert_equal(i, #bytes(i));
	end
end