Compare commits

...

2 Commits

Author SHA1 Message Date
Ben Harris 44cf32618f port glob test
continuous-integration/drone/push Build is failing Details
2024-04-23 18:18:11 -04:00
Ben Harris d3c19a0987 rename test folders 2024-04-23 18:17:27 -04:00
27 changed files with 69 additions and 44 deletions

View File

@ -1,6 +1,5 @@
using System.Collections.Generic;
#nullable enable
namespace IRCRobots
{
public class ConnectionParams

View File

@ -1,5 +1,4 @@
#nullable enable
using System.Collections.Generic;
using System.Collections.Generic;
namespace IRCRobots
{

View File

@ -1,11 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<PackageId>IRCRobots</PackageId>
<Version>1.4.0</Version>
<Authors>Ben Harris</Authors>
<Company>tildeverse.org</Company>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageProjectUrl>https://tildegit.org/irctokens/ircsharp</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://tildegit.org/irctokens/ircsharp/src/branch/main/IRCRobots</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<RepositoryType>git</RepositoryType>
<PackageTags>irc</PackageTags>
<PackageVersion>1.4.0</PackageVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<DebugType>embedded</DebugType>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\IRCStates\IRCStates.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\IRCStates\IRCStates.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.Gitea" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>
</Project>

View File

@ -1,5 +1,4 @@
#nullable enable
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using IRCTokens;

View File

@ -1,5 +1,4 @@
#nullable enable
using System.Threading.Tasks;
using System.Threading.Tasks;
namespace IRCRobots
{

View File

@ -11,6 +11,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\IRCRobots\IRCRobots.csproj" />
<ProjectReference Include="..\IRCStates\IRCStates.csproj" />
<ProjectReference Include="..\IRCTokens\IRCTokens.csproj" />
</ItemGroup>
@ -23,7 +24,7 @@
</ItemGroup>
<ItemGroup>
<None Update="Tokenization\Data\msg-*.yaml">
<None Update="Tokens\Data\msg-*.yaml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

View File

@ -1,13 +1,16 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using IRCRobots;
namespace IRCSharp.Tests.Robots
namespace IRCSharp.Tests.Robots;
[TestClass]
public class GlobTests
{
[TestClass]
public class Glob
[TestMethod]
public void GlobCollapse()
{
[TestMethod]
public void GlobCollapse()
{
}
Assert.AreEqual("?*", Glob.Collapse("**?*"));
Assert.AreEqual("a?*a*", Glob.Collapse("a**?a*"));
Assert.AreEqual("????*a", Glob.Collapse("?*?*?*?*a"));
Assert.AreEqual("a?*a?*", Glob.Collapse("a*?*a?**"));
}
}
}

View File

@ -1,4 +1,4 @@
namespace IRCSharp.Tests.State;
namespace IRCSharp.Tests.States;
[TestClass]
public class Cap

View File

@ -1,6 +1,6 @@
// ReSharper disable IdentifierTypo
// ReSharper disable StringLiteralTypo
namespace IRCSharp.Tests.State;
namespace IRCSharp.Tests.States;
[TestClass]
public class Casemap

View File

@ -1,4 +1,4 @@
namespace IRCSharp.Tests.State;
namespace IRCSharp.Tests.States;
[TestClass]
public class Channel

View File

@ -1,4 +1,4 @@
namespace IRCSharp.Tests.State;
namespace IRCSharp.Tests.States;
[TestClass]
public class Emit

View File

@ -1,6 +1,6 @@
// ReSharper disable InconsistentNaming
// ReSharper disable StringLiteralTypo
namespace IRCSharp.Tests.State;
namespace IRCSharp.Tests.States;
[TestClass]
public class ISupport

View File

@ -1,5 +1,5 @@
// ReSharper disable StringLiteralTypo
namespace IRCSharp.Tests.State;
namespace IRCSharp.Tests.States;
[TestClass]
public class Mode

View File

@ -1,4 +1,4 @@
namespace IRCSharp.Tests.State;
namespace IRCSharp.Tests.States;
[TestClass]
public class Motd

View File

@ -1,4 +1,4 @@
namespace IRCSharp.Tests.State;
namespace IRCSharp.Tests.States;
[TestClass]
public class Sasl

View File

@ -1,4 +1,4 @@
namespace IRCSharp.Tests.State;
namespace IRCSharp.Tests.States;
[TestClass]
public class User

View File

@ -1,5 +1,5 @@
// ReSharper disable StringLiteralTypo
namespace IRCSharp.Tests.State;
namespace IRCSharp.Tests.States;
[TestClass]
public class Who

View File

@ -1,6 +1,6 @@
using YamlDotNet.Serialization;
namespace IRCSharp.Tests.Tokenization.Data;
namespace IRCSharp.Tests.Tokens.Data;
public class JoinModel
{

View File

@ -1,4 +1,4 @@
namespace IRCSharp.Tests.Tokenization.Data;
namespace IRCSharp.Tests.Tokens.Data;
public class SplitModel
{

View File

@ -1,5 +1,5 @@
// ReSharper disable StringLiteralTypo
namespace IRCSharp.Tests.Tokenization;
namespace IRCSharp.Tests.Tokens;
[TestClass]
public class Format

View File

@ -1,4 +1,4 @@
namespace IRCSharp.Tests.Tokenization;
namespace IRCSharp.Tests.Tokens;
[TestClass]
public class Hostmask

View File

@ -1,9 +1,9 @@
using System.Globalization;
using IRCSharp.Tests.Tokenization.Data;
using IRCSharp.Tests.Tokens.Data;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
namespace IRCSharp.Tests.Tokenization;
namespace IRCSharp.Tests.Tokens;
[TestClass]
public class Parser
@ -20,7 +20,7 @@ public class Parser
[TestMethod]
public void Split()
{
foreach (var test in LoadYaml<SplitModel>("Tokenization/Data/msg-split.yaml").Tests)
foreach (var test in LoadYaml<SplitModel>("Tokens/Data/msg-split.yaml").Tests)
{
var tokens = new Line(test.Input);
var atoms = test.Atoms;
@ -37,7 +37,7 @@ public class Parser
[TestMethod]
public void Join()
{
foreach (var test in LoadYaml<JoinModel>("Tokenization/Data/msg-join.yaml").Tests)
foreach (var test in LoadYaml<JoinModel>("Tokens/Data/msg-join.yaml").Tests)
{
var atoms = test.Atoms;
var line = new Line

View File

@ -1,4 +1,4 @@
namespace IRCSharp.Tests.Tokenization;
namespace IRCSharp.Tests.Tokens;
[TestClass]
public class StatefulDecoder

View File

@ -1,4 +1,4 @@
namespace IRCSharp.Tests.Tokenization;
namespace IRCSharp.Tests.Tokens;
[TestClass]
public class StatefulEncoder

View File

@ -1,4 +1,4 @@
namespace IRCSharp.Tests.Tokenization;
namespace IRCSharp.Tests.Tokens;
[TestClass]
public class Tokenization