Mercurial > prosody-hg
comparison tests/test_core_configmanager.lua @ 5776:bd0ff8ae98a8
Remove all trailing whitespace
| author | Florian Zeitz <florob@babelmonkeys.de> |
|---|---|
| date | Fri, 09 Aug 2013 17:48:21 +0200 |
| parents | 468d7a2f85ba |
| children |
comparison
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 | 9 |
| 13 assert_equal(get("example.com", "testkey"), 123, "Retrieving a set key"); | 13 assert_equal(get("example.com", "testkey"), 123, "Retrieving a set key"); |
| 14 | 14 |
| 15 config.set("*", "testkey1", 321); | 15 config.set("*", "testkey1", 321); |
| 16 assert_equal(get("*", "testkey1"), 321, "Retrieving a set global key"); | 16 assert_equal(get("*", "testkey1"), 321, "Retrieving a set global key"); |
| 17 assert_equal(get("example.com", "testkey1"), 321, "Retrieving a set key of undefined host, of which only a globally set one exists"); | 17 assert_equal(get("example.com", "testkey1"), 321, "Retrieving a set key of undefined host, of which only a globally set one exists"); |
| 18 | 18 |
| 19 config.set("example.com", ""); -- Creates example.com host in config | 19 config.set("example.com", ""); -- Creates example.com host in config |
| 20 assert_equal(get("example.com", "testkey1"), 321, "Retrieving a set key, of which only a globally set one exists"); | 20 assert_equal(get("example.com", "testkey1"), 321, "Retrieving a set key, of which only a globally set one exists"); |
| 21 | 21 |
| 22 assert_equal(get(), nil, "No parameters to get()"); | 22 assert_equal(get(), nil, "No parameters to get()"); |
| 23 assert_equal(get("undefined host"), nil, "Getting for undefined host"); | 23 assert_equal(get("undefined host"), nil, "Getting for undefined host"); |
| 24 assert_equal(get("undefined host", "undefined key"), nil, "Getting for undefined host & key"); | 24 assert_equal(get("undefined host", "undefined key"), nil, "Getting for undefined host & key"); |
| 25 end | 25 end |
| 26 | 26 |
