recrownedathenaeum/RecrownedAthenaeum.ConsoleTools/CommandProcessor/TestCommand.cs

40 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace RecrownedAthenaeum.Tools.CommandProcessor
{
class TestCommand : EngineCommand
{
public TestCommand() : base("test")
{
}
public override string Help(string argument = null)
{
switch (argument)
{
case null:
return "Test command. Meant for testing random stuff. Current arguments: \"-textWrap\".\n" +
"Its ironic that the help section is also meant to test things.";
case "-textWrap":
return "-textWrap prints a large amount of text to test the text wrap.";
}
return "Test command.";
}
public override void Run(string[] arguments = null)
{
if (arguments != null && arguments[0] == "-textWrap")
{
ConsoleUtilities.WriteWrapped("Lorem ipsum dolor sit amet, consectetur adipiscing elit.[here]\n Duis semper lacinia nisl, eget efficitur massa feugiat vel. Ut egestas elit id sollicitudin pellentesque.[here no space after break.]\nFusce ullamcorper nec turpis at aliquam. Donec cursus mi nec porttitor convallis. Nullam condimentum sollicitudin volutpat. Pellentesque tellus ligula, eleifend sit amet ante ac, accumsan volutpat lorem. Suspendisse potenti. Vestibulum at sodales ipsum. Mauris dignissim maximus purus sagittis elementum.", true);
ConsoleUtilities.WriteWrapped("test");
ConsoleUtilities.WriteWrapped(". ");
ConsoleUtilities.WriteWrapped("test.");
}
base.Run(arguments);
}
}
}