Skip to content

Commit 5c0afa5

Browse files
committed
Initial Commit
* Upload License. * Create Documentation. * The Original 13 Tests associated with ANSI Utils Library. * Include the Icon * CSPROJ setup with the Newly uploaded Nuget. * Update the GitIgnore.
1 parent 16d26e3 commit 5c0afa5

21 files changed

+665
-0
lines changed

.gitignore

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Object files
5+
*.o
6+
*.ko
7+
*.obj
8+
*.elf
9+
10+
# Linker output
11+
*.ilk
12+
*.map
13+
*.exp
14+
15+
# Precompiled Headers
16+
*.gch
17+
*.pch
18+
19+
# Libraries
20+
*.lib
21+
*.a
22+
*.la
23+
*.lo
24+
25+
# Shared objects (inc. Windows DLLs)
26+
*.so
27+
*.so.*
28+
*.dylib
29+
30+
# Executables
31+
*.exe
32+
*.out
33+
*.app
34+
*.i*86
35+
*.x86_64
36+
*.hex
37+
38+
# Debug files
39+
*.dSYM/
40+
*.su
41+
*.idb
42+
*.pdb
43+
44+
# Kernel Module Compile Results
45+
*.mod*
46+
*.cmd
47+
.tmp_versions/
48+
modules.order
49+
Module.symvers
50+
Mkfile.old
51+
dkms.conf
52+
53+
bin/
54+
obj/
55+
.vs/
56+
.git/
57+
.idea/
58+
*.user
59+
*Utils*/

ANSI Utils Tester.csproj

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<OutputType>Exe</OutputType>
4+
<TargetFramework>netframework4.7.2</TargetFramework>
5+
<AssemblyName>ANSI Utils Tester</AssemblyName>
6+
<Description>The Tester for Cecil ANSI Utils</Description>
7+
<Version>1.0.0</Version>
8+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
9+
<LangVersion>Latest</LangVersion>
10+
<RootNamespace>ANSI Utils Tester</RootNamespace>
11+
<ImplicitUsings>enable</ImplicitUsings>
12+
<Nullable>enable</Nullable>
13+
<ApplicationIcon>CecilLibsLogo.ico</ApplicationIcon>
14+
</PropertyGroup>
15+
16+
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
17+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" />
18+
</ItemGroup>
19+
20+
<ItemGroup>
21+
<PackageReference Include="Cecil.ANSI_Utils" Version="1.0.1" />
22+
</ItemGroup>
23+
</Project>

ANSI Utils Tester.sln

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ANSI Utils Tester", "ANSI Utils Tester.csproj", "{D1FF835F-3980-4C99-A83C-7943004EC0D9}"
4+
EndProject
5+
Global
6+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7+
Debug|Any CPU = Debug|Any CPU
8+
Release|Any CPU = Release|Any CPU
9+
EndGlobalSection
10+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
11+
{D1FF835F-3980-4C99-A83C-7943004EC0D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
12+
{D1FF835F-3980-4C99-A83C-7943004EC0D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
13+
{D1FF835F-3980-4C99-A83C-7943004EC0D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
14+
{D1FF835F-3980-4C99-A83C-7943004EC0D9}.Release|Any CPU.Build.0 = Release|Any CPU
15+
EndGlobalSection
16+
EndGlobal

ANSITests/Test1.cs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using Cecil_Libraries.ANSI_Utils.Lists;
2+
3+
namespace ANSI_Utils_Tester.ANSITests
4+
{
5+
public class Test1
6+
{
7+
/// <summary>
8+
/// This was a test to see if there was a `6` in the mode slot, and there was indeed a `6` available its just not really functional it most prompts but its rapid blinking.
9+
/// </summary>
10+
public static void Test()
11+
{
12+
Console.WriteLine("Test 1");
13+
14+
// How to read this; Turn Entry 7 or 7th color which is White on for the specified mode, say Hello World!, reset everything.
15+
Console.WriteLine(ANSICodeLists.ColorList[7] + "Hello World!" + ANSICodeLists.ResetColor);
16+
Console.WriteLine(ANSICodeLists.BoldColorList[7] + "Hello World!" + ANSICodeLists.ResetColor);
17+
Console.WriteLine(ANSICodeLists.DarkenedColorList[7] + "Hello World!" + ANSICodeLists.ResetColor);
18+
Console.WriteLine(ANSICodeLists.ItalicColorList[7] + "Hello World!" + ANSICodeLists.ResetColor);
19+
Console.WriteLine(ANSICodeLists.UnderlineColorList[7] + "Hello World!" + ANSICodeLists.ResetColor);
20+
Console.WriteLine(ANSICodeLists.FlashyColorList[7] + "Hello World!" + ANSICodeLists.ResetColor);
21+
Console.WriteLine("\u001b[6;37m" + "Hello World!" + ANSICodeLists.ResetColor);
22+
Console.WriteLine(ANSICodeLists.HighlighterColorText[7] + "Hello World!" + ANSICodeLists.ResetColor);
23+
Console.WriteLine(ANSICodeLists.InvisibleColorText[7] + "Hello World!" + ANSICodeLists.ResetColor);
24+
Console.WriteLine(ANSICodeLists.StrikethroughColorText[7] + "Hello World!" + ANSICodeLists.ResetColor);
25+
26+
Console.ReadLine();
27+
}
28+
}
29+
}

ANSITests/Test10.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using Cecil_Libraries.ANSI_Utils.Objects;
2+
using Cecil_Libraries.ANSI_Utils.Util;
3+
4+
namespace ANSI_Utils_Tester.ANSITests
5+
{
6+
public class Test10
7+
{
8+
/// <summary>
9+
/// This was a test to see if Grayscale to RGB conversion was working.
10+
/// </summary>
11+
public static void Test()
12+
{
13+
Console.WriteLine("Test 10");
14+
15+
(int r, int g, int b) = ConvertFromXToRGB.ConvertToRGBFromGrayscale(134);
16+
17+
ColorRGB grayscale = new ColorRGB("Regular", r, g, b);
18+
ColorRGB degrayscale = new ColorRGB("Regular", r, g, b, reset: true);
19+
20+
Console.WriteLine($"Let's give this {grayscale.Format()}grayscale (134){degrayscale.Format()} conversion a test. Resultants; {r}, {g}, {b}");
21+
Console.ReadLine();
22+
}
23+
}
24+
}

ANSITests/Test11.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using Cecil_Libraries.ANSI_Utils.Objects;
2+
using Cecil_Libraries.ANSI_Utils.Util;
3+
4+
namespace ANSI_Utils_Tester.ANSITests
5+
{
6+
public class Test11
7+
{
8+
/// <summary>
9+
/// This was a Test to see if Hex to RGB was working.
10+
/// </summary>
11+
public static void Test()
12+
{
13+
Console.WriteLine("Test 11");
14+
15+
(int r, int g, int b) = ConvertFromXToRGB.ConverToRGBFromHex("#aa55cb");
16+
17+
ColorRGB hex = new ColorRGB("Regular", r, g, b);
18+
ColorRGB dehex = new ColorRGB("Regular", r, g, b, reset: true);
19+
20+
Console.WriteLine($"Let's give this {hex.Format()}hex (#aa55cb){dehex.Format()} conversion a test. Resultants; {r}, {g}, {b}");
21+
Console.ReadLine();
22+
}
23+
}
24+
}

ANSITests/Test12.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using Cecil_Libraries.ANSI_Utils.Objects;
2+
using Cecil_Libraries.ANSI_Utils.Util;
3+
4+
namespace ANSI_Utils_Tester.ANSITests
5+
{
6+
public class Test12
7+
{
8+
/// <summary>
9+
/// This was a Test to see if Hue Shade Value (HSV) to RGB was working, which from testing it works with some rounding errors.
10+
/// </summary>
11+
public static void Test()
12+
{
13+
Console.WriteLine("Test 12");
14+
15+
(int r, int g, int b) = ConvertFromXToRGB.ConvertToRGBFromHueShadeValue(283, 58, 79);
16+
17+
ColorRGB hsv = new ColorRGB("Regular", r, g, b);
18+
ColorRGB dehsv = new ColorRGB("Regular", r, g, b, reset: true);
19+
20+
Console.WriteLine($"Let's give this {hsv.Format()}hsv (283, 58, 79){dehsv.Format()} conversion a test. Resultants; {r}, {g}, {b}");
21+
Console.ReadLine();
22+
}
23+
}
24+
}

ANSITests/Test13.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using Cecil_Libraries.ANSI_Utils.Objects;
2+
using Cecil_Libraries.ANSI_Utils.Util;
3+
4+
namespace ANSI_Utils_Tester.ANSITests
5+
{
6+
public class Test13
7+
{
8+
/// <summary>
9+
/// This was a test to see if Hue Saturation Lightness to RGB was working, which from testing it works mostly with some rounding errors.
10+
/// </summary>
11+
public static void Test()
12+
{
13+
Console.WriteLine("Test 13");
14+
(int r, int g, int b) = ConvertFromXToRGB.ConvertToRGBFromHueSaturationLightness(283, 53, 56);
15+
ColorRGB hsl = new ColorRGB("Regular", r, g, b);
16+
ColorRGB dehsl = new ColorRGB("Regular", r, g, b, reset: true);
17+
Console.WriteLine($"Let's give this {hsl.Format()}hsl (283, 53, 56){dehsl.Format()} conversion a test. Resultants; {r}, {g}, {b}");
18+
Console.ReadLine();
19+
}
20+
}
21+
}

ANSITests/Test2.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using Cecil_Libraries.ANSI_Utils.Objects;
2+
3+
namespace ANSI_Utils_Tester.ANSITests
4+
{
5+
public class Test2
6+
{
7+
/// <summary>
8+
/// This is a test to check if resets for Foreground Low Intensity worked with the Object.
9+
/// </summary>
10+
public static void Test()
11+
{
12+
Console.WriteLine("Test 2");
13+
14+
Color highlightRed = new Color("Highlight", "Red");
15+
Color delightRed = new Color("Highlight", "Red", reset:true);
16+
Color red = new Color("Regular", "Red");
17+
Color dered = new Color("Regular", "Red", reset:true);
18+
19+
Console.WriteLine($"{red.Format()}This is a {highlightRed.Format()}ANSI{delightRed.Format()} Test{dered.Format()}, test complete");
20+
Console.ReadLine();
21+
}
22+
}
23+
}

ANSITests/Test3.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using Cecil_Libraries.ANSI_Utils.Objects;
2+
3+
namespace ANSI_Utils_Tester.ANSITests
4+
{
5+
public class Test3
6+
{
7+
/// <summary>
8+
/// This is a test to check if resets for Background Low Intensity worked with the Object.
9+
/// </summary>
10+
public static void Test()
11+
{
12+
Console.WriteLine("Test 3");
13+
14+
Color highlightRedBG = new Color("Highlight", "Red", background:true);
15+
Color delightRedBG = new Color("Highlight", "Red", reset:true, background:true);
16+
Color redBG = new Color("Regular", "Red", background:true);
17+
Color deredBG = new Color("Regular", "Red", reset:true, background:true);
18+
19+
Console.WriteLine($"{redBG.Format()}This is a {highlightRedBG.Format()}ANSI{delightRedBG.Format()} Test{deredBG.Format()}, test complete");
20+
Console.ReadLine();
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)