X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Ftests%2Fselftest.py;h=4ffe0275a7f827c909b4b00b9961ab628fb636fe;hp=27378e91dbde345c7dc1185cdb845b6d67554591;hb=eb44bf1fb134133277139432a8dce72b9f38ba9d;hpb=a848ee505cff4e968417004173adc790f4e78ff1 diff --git a/mudpy/tests/selftest.py b/mudpy/tests/selftest.py index 27378e9..4ffe027 100644 --- a/mudpy/tests/selftest.py +++ b/mudpy/tests/selftest.py @@ -167,6 +167,18 @@ test_show_log = ( "[0-9]+\. The matching lines\r\nfrom [0-9]+ to [0-9]+ are:", ""), ) +test_custom_loglevel = ( + (2, "> ", "set account:admin loglevel 2"), + (2, "You have successfully .*> ", "show log"), + (2, "There are [0-9]+ log lines in memory and [0-9]+ at or above level " + "[0-9]+\. The matching lines\r\nfrom [0-9]+ to [0-9]+ are:", ""), +) + +test_invalid_loglevel = ( + (2, "> ", "set account:admin loglevel two"), + (2, "Value \"two\" of type \"\" cannot be coerced .*> ", ""), +) + test_log_no_errors = ( (2, "> ", "show log 7"), (2, "None of the [0-9]+ lines in memory matches your request\.", ""), @@ -189,6 +201,8 @@ dialogue = ( (test_admin_help, "admin help"), (test_show_element, "show element"), (test_show_log, "show log"), + (test_custom_loglevel, "custom loglevel"), + (test_invalid_loglevel, "invalid loglevel"), (test_log_no_errors, "no errors logged"), )