tests/test_core_s2smanager.lua
changeset 5776 bd0ff8ae98a8
parent 5604 6df0ec991f2e
equal deleted inserted replaced
5775:a6c2b8933507 5776:bd0ff8ae98a8
     1 -- Prosody IM
     1 -- Prosody IM
     2 -- Copyright (C) 2008-2010 Matthew Wild
     2 -- Copyright (C) 2008-2010 Matthew Wild
     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 
     8 
     9 env = {
     9 env = {
    14 	local r1 = { priority = 10, weight = 0 }
    14 	local r1 = { priority = 10, weight = 0 }
    15 	local r2 = { priority = 100, weight = 0 }
    15 	local r2 = { priority = 100, weight = 0 }
    16 	local r3 = { priority = 1000, weight = 2 }
    16 	local r3 = { priority = 1000, weight = 2 }
    17 	local r4 = { priority = 1000, weight = 2 }
    17 	local r4 = { priority = 1000, weight = 2 }
    18 	local r5 = { priority = 1000, weight = 5 }
    18 	local r5 = { priority = 1000, weight = 5 }
    19 	
    19 
    20 	assert_equal(csp(r1, r1), false);
    20 	assert_equal(csp(r1, r1), false);
    21 	assert_equal(csp(r1, r2), true);
    21 	assert_equal(csp(r1, r2), true);
    22 	assert_equal(csp(r1, r3), true);
    22 	assert_equal(csp(r1, r3), true);
    23 	assert_equal(csp(r1, r4), true);
    23 	assert_equal(csp(r1, r4), true);
    24 	assert_equal(csp(r1, r5), true);
    24 	assert_equal(csp(r1, r5), true);