mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +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>
37 lines
828 B
C#
37 lines
828 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
|
|
} |