mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
* Add explicit file name unicode mappings * Added nerd file extensions * Add folder icon * Added tests and attribution * Fix tree view not using System.IO.Abstractions * Make FileDialog tree use IconGetter * Added context to IconGetter * Make Nerd a config setting * Fix typo in attribution * tidy up * Change open folder check to null or whitespace * Update class diagram to show new classes * Rename configuration property NerdFonts and set it to ThemeScope * Move NerdFonts setting to ConsoleDriver * Move NerdFonts setting to NerdFonts class and rename Enable --------- Co-authored-by: Tig <tig@users.noreply.github.com>
This commit is contained in:
37
UnitTests/FileServices/NerdFontsTests.cs
Normal file
37
UnitTests/FileServices/NerdFontsTests.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.IO.Abstractions.TestingHelpers;
|
||||
using System.Linq;
|
||||
using Terminal.Gui;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Terminal.Gui.FileServicesTests {
|
||||
|
||||
public class NerdFontTests
|
||||
{
|
||||
[Fact]
|
||||
public void TestAllFilenamesMapToKnownGlyphs()
|
||||
{
|
||||
var f = new NerdFonts();
|
||||
foreach(var k in f.FilenameToIcon)
|
||||
{
|
||||
Assert.Contains(k.Value, f.Glyphs.Keys);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void TestAllExtensionsMapToKnownGlyphs()
|
||||
{
|
||||
var f = new NerdFonts();
|
||||
foreach(var k in f.ExtensionToIcon)
|
||||
{
|
||||
Assert.Contains(k.Value, f.Glyphs.Keys);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user