all tests pass
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
aef26a40cb
commit
43aec9591c
|
@ -71,13 +71,22 @@ namespace IrcStates
|
||||||
StatusMsg.AddRange(value.Select(c => c.ToString(CultureInfo.InvariantCulture)));
|
StatusMsg.AddRange(value.Select(c => c.ToString(CultureInfo.InvariantCulture)));
|
||||||
break;
|
break;
|
||||||
case "MODES":
|
case "MODES":
|
||||||
Modes = int.Parse(value, NumberStyles.Integer, CultureInfo.InvariantCulture);
|
if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var modes))
|
||||||
|
Modes = modes;
|
||||||
|
else
|
||||||
|
Modes = -1;
|
||||||
break;
|
break;
|
||||||
case "MONITOR":
|
case "MONITOR":
|
||||||
Monitor = int.Parse(value, NumberStyles.Integer, CultureInfo.InvariantCulture);
|
if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var monitor))
|
||||||
|
Monitor = monitor;
|
||||||
|
else
|
||||||
|
Monitor = -1;
|
||||||
break;
|
break;
|
||||||
case "WATCH":
|
case "WATCH":
|
||||||
Watch = int.Parse(value, NumberStyles.Integer, CultureInfo.InvariantCulture);
|
if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var watch))
|
||||||
|
Watch = watch;
|
||||||
|
else
|
||||||
|
Watch = -1;
|
||||||
break;
|
break;
|
||||||
case "CASEMAPPING":
|
case "CASEMAPPING":
|
||||||
if (Enum.TryParse(value, true, out Casemap.CaseMapping caseMapping)) CaseMapping = caseMapping;
|
if (Enum.TryParse(value, true, out Casemap.CaseMapping caseMapping)) CaseMapping = caseMapping;
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace IrcStates.Tests
|
||||||
Assert.AreEqual("o", _server.ISupport.Prefix.FromPrefix("@"));
|
Assert.AreEqual("o", _server.ISupport.Prefix.FromPrefix("@"));
|
||||||
Assert.IsNull(_server.ISupport.Prefix.FromPrefix("&"));
|
Assert.IsNull(_server.ISupport.Prefix.FromPrefix("&"));
|
||||||
|
|
||||||
_server.Parse(new Line("005 * PREFIX=(qaohv)~&#%+ *"));
|
_server.Parse(new Line("005 * PREFIX=(qaohv)~&@%+ *"));
|
||||||
CollectionAssert.AreEqual(new List<string>
|
CollectionAssert.AreEqual(new List<string>
|
||||||
{
|
{
|
||||||
"q",
|
"q",
|
||||||
|
|
Loading…
Reference in New Issue