mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-11-04 02:25:28 +08:00 
			
		
		
		
	Fix @ being used in figlet font
This commit is contained in:
		
							
								
								
									
										1239
									
								
								test/Spectre.Console.Tests/Data/poison.flf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1239
									
								
								test/Spectre.Console.Tests/Data/poison.flf
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
                                                                                                                                                                                    
 | 
			
		||||
@@@@@@@    @@@@@@   @@@@@@@  @@@@@@@   @@@  @@@  @@@     @@@  @@@  @@@   @@@@@@    @@@@@@      @@@  @@@  @@@@@@@@  @@@@@@@   @@@@@@@@                                               
 | 
			
		||||
@@@@@@@@  @@@@@@@@  @@@@@@@  @@@@@@@@  @@@  @@@  @@@     @@@  @@@  @@@  @@@@@@@@  @@@@@@@      @@@  @@@  @@@@@@@@  @@@@@@@@  @@@@@@@@                                               
 | 
			
		||||
@@!  @@@  @@!  @@@    @@!    @@!  @@@  @@!  @@!  !@@     @@!  @@!  @@!  @@!  @@@  !@@          @@!  @@@  @@!       @@!  @@@  @@!                                                    
 | 
			
		||||
!@!  @!@  !@!  @!@    !@!    !@!  @!@  !@!  !@!  @!!     !@!  !@!  !@!  !@!  @!@  !@!          !@!  @!@  !@!       !@!  @!@  !@!                                                    
 | 
			
		||||
@!@@!@!   @!@!@!@!    @!!    @!@!!@!   !!@  @!@@!@!      @!!  !!@  @!@  @!@!@!@!  !!@@!!       @!@!@!@!  @!!!:!    @!@!!@!   @!!!:!                                                 
 | 
			
		||||
!!@!!!    !!!@!!!!    !!!    !!@!@!    !!!  !!@!!!       !@!  !!!  !@!  !!!@!!!!   !!@!!!      !!!@!!!!  !!!!!:    !!@!@!    !!!!!:                                                 
 | 
			
		||||
!!:       !!:  !!!    !!:    !!: :!!   !!:  !!: :!!      !!:  !!:  !!:  !!:  !!!       !:!     !!:  !!!  !!:       !!: :!!   !!:                                                    
 | 
			
		||||
:!:       :!:  !:!    :!:    :!:  !:!  :!:  :!:  !:!     :!:  :!:  :!:  :!:  !:!      !:!      :!:  !:!  :!:       :!:  !:!  :!:                                                    
 | 
			
		||||
 ::       ::   :::     ::    ::   :::   ::   ::  :::      :::: :: :::   ::   :::  :::: ::      ::   :::   :: ::::  ::   :::   :: ::::                                               
 | 
			
		||||
 :         :   : :     :      :   : :  :     :   :::       :: :  : :     :   : :  :: : :        :   : :  : :: ::    :   : :  : :: ::                                                
 | 
			
		||||
                                                                                                                                                                                    
 | 
			
		||||
@@ -9,6 +9,8 @@
 | 
			
		||||
    <AdditionalFiles Include="..\..\src\stylecop.json" Link="Properties/stylecop.json" />
 | 
			
		||||
    <None Remove="Data\starwars.flf" />
 | 
			
		||||
    <EmbeddedResource Include="Data\starwars.flf" />
 | 
			
		||||
    <None Remove="Data\poison.flf" />
 | 
			
		||||
    <EmbeddedResource Include="Data\poison.flf" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
 
 | 
			
		||||
@@ -4,20 +4,23 @@ namespace Spectre.Console.Tests.Unit;
 | 
			
		||||
[ExpectationPath("Widgets/Figlet")]
 | 
			
		||||
public sealed class FigletTests
 | 
			
		||||
{
 | 
			
		||||
    [Fact]
 | 
			
		||||
    [Theory]
 | 
			
		||||
    [InlineData("starwars.flf")]
 | 
			
		||||
    [InlineData("poison.flf")]
 | 
			
		||||
    [Expectation("Load_Stream")]
 | 
			
		||||
    public async Task Should_Load_Font_From_Stream()
 | 
			
		||||
    public async Task Should_Load_Font_From_Stream(string fontfile)
 | 
			
		||||
    {
 | 
			
		||||
        // Given
 | 
			
		||||
        var console = new TestConsole().Width(180);
 | 
			
		||||
        var font = FigletFont.Load(EmbeddedResourceReader.LoadResourceStream("Spectre.Console.Tests/Data/starwars.flf"));
 | 
			
		||||
        var font = FigletFont.Load(EmbeddedResourceReader.LoadResourceStream($"Spectre.Console.Tests/Data/{fontfile}"));
 | 
			
		||||
        var text = new FigletText(font, "Patrik was here");
 | 
			
		||||
 | 
			
		||||
        // When
 | 
			
		||||
        console.Write(text);
 | 
			
		||||
 | 
			
		||||
        // Then
 | 
			
		||||
        await Verifier.Verify(console.Output);
 | 
			
		||||
        await Verifier.Verify(console.Output)
 | 
			
		||||
            .UseParameters(fontfile);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    [Fact]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user