Exemplo n.º 1
0
        public void Test_render_alphabet_mini()
        {
            var lines    = Figlet.Render("abcdefghijklmnopqrstuvwxyz", Figlet.Fonts.Mini, SmushMode.Kern);
            var expected =
                @"                    _                                                                     
 _. |_   _  _|  _ _|_ _  |_  o o |  | ._ _  ._   _  ._   _. ._ _ _|_                   _  
(_| |_) (_ (_| (/_ | (_| | | | | |< | | | | | | (_) |_) (_| | _>  |_ |_| \/ \/\/ >< \/ /_ 
                      _|      _|                    |     |                         /     
";

            Assert.AreEqual(expected, lines);
        }
Exemplo n.º 2
0
        public void Test_render()
        {
            var lines    = Figlet.Render("a");
            var expected = @"       
  __ _ 
 / _` |
| (_| |
 \__,_|
       
";

            Assert.AreEqual(expected, lines);
        }
Exemplo n.º 3
0
        public void Test_All_Fonts()
        {
            var names = Figlet.FontNames();
            var sb    = new StringBuilder();

            foreach (var fontName in names)
            {
                sb.AppendLine(fontName);
                sb.AppendLine(Figlet.Render(fontName, fontName, SmushMode.Kern));
            }

            Console.Write(sb.ToString());
            Assert.IsTrue(true);
        }
Exemplo n.º 4
0
        public void Test_render_alphabet()
        {
            var lines    = Figlet.Render("abcdefghijklmnopqrstuvwxyz", smushMode: SmushMode.Kern);
            var expected =
                @"        _               _         __         _      _   _  _     _                                                    _                                             
  __ _ | |__    ___  __| |  ___  / _|  __ _ | |__  (_) (_)| | __| | _ __ ___   _ __    ___   _ __    __ _  _ __  ___ | |_  _   _ __   ____      ____  __ _   _  ____
 / _` || '_ \  / __|/ _` | / _ \| |_  / _` || '_ \ | | | || |/ /| || '_ ` _ \ | '_ \  / _ \ | '_ \  / _` || '__|/ __|| __|| | | |\ \ / /\ \ /\ / /\ \/ /| | | ||_  /
| (_| || |_) || (__| (_| ||  __/|  _|| (_| || | | || | | ||   < | || | | | | || | | || (_) || |_) || (_| || |   \__ \| |_ | |_| | \ V /  \ V  V /  >  < | |_| | / / 
 \__,_||_.__/  \___|\__,_| \___||_|   \__, ||_| |_||_|_/ ||_|\_\|_||_| |_| |_||_| |_| \___/ | .__/  \__, ||_|   |___/ \__| \__,_|  \_/    \_/\_/  /_/\_\ \__, |/___|
                                      |___/          |__/                                   |_|        |_|                                               |___/      
";

            Assert.AreEqual(expected, lines);
        }
Exemplo n.º 5
0
        public void Test_words_Mini_Font()
        {
            var figlet = new Figlet(fontFile: Figlet.Fonts.Mini, smushMode: SmushMode.Kern);

            figlet.Add("Word One!");

            var lines    = figlet.Render();
            var expected =
                @"                   _            
\    / _  ._ _|   / \ ._   _  | 
 \/\/ (_) | (_|   \_/ | | (/_ o 
                                
";

            Assert.AreEqual(expected, lines);
        }
Exemplo n.º 6
0
        public void Test_a()
        {
            var figlet = new Figlet();

            figlet.Add('a');

            var lines    = figlet.Render();
            var expected = @"       
  __ _ 
 / _` |
| (_| |
 \__,_|
       
";

            Assert.AreEqual(expected, lines);
        }
Exemplo n.º 7
0
        public void Test_words_Slant_Font()
        {
            var figlet = new Figlet(fontFile: Figlet.Fonts.Slant, smushMode: SmushMode.Kern);

            figlet.Add("Word One!");

            var lines    = figlet.Render();
            var expected =
                @" _       __                  __   ____                __
| |     / /____   _____ ____/ /  / __ \ ____   ___   / /
| | /| / // __ \ / ___// __  /  / / / // __ \ / _ \ / / 
| |/ |/ // /_/ // /   / /_/ /  / /_/ // / / //  __//_/  
|__/|__/ \____//_/    \__,_/   \____//_/ /_/ \___/(_)   
                                                        
";

            Assert.AreEqual(expected, lines);
        }
Exemplo n.º 8
0
        public void Test_words_Kern()
        {
            var figlet = new Figlet(smushMode: SmushMode.Kern);

            figlet.Add("Word One!");

            var lines    = figlet.Render();
            var expected =
                @"__        __               _    ___                _ 
\ \      / /___   _ __  __| |  / _ \  _ __    ___ | |
 \ \ /\ / // _ \ | '__|/ _` | | | | || '_ \  / _ \| |
  \ V  V /| (_) || |  | (_| | | |_| || | | ||  __/|_|
   \_/\_/  \___/ |_|   \__,_|  \___/ |_| |_| \___|(_)
                                                     
";

            Assert.AreEqual(expected, lines);
        }
Exemplo n.º 9
0
        public void Test_abcde_kerning()
        {
            var figlet = new Figlet(smushMode: SmushMode.Kern);

            figlet.Add("abcdefg");

            var lines    = figlet.Render();
            var expected =
                @"        _               _         __        
  __ _ | |__    ___  __| |  ___  / _|  __ _ 
 / _` || '_ \  / __|/ _` | / _ \| |_  / _` |
| (_| || |_) || (__| (_| ||  __/|  _|| (_| |
 \__,_||_.__/  \___|\__,_| \___||_|   \__, |
                                      |___/ 
";

            Assert.AreEqual(expected, lines);
        }
Exemplo n.º 10
0
        public void Test_abcde()
        {
            var figlet = new Figlet();

            figlet.Add("abcdefg");

            var lines    = figlet.Render();
            var expected =
                @"       _             _       __       
  __ _| |__   ___ __| | ___ / _| __ _ 
 / _` | '_ \ / __/ _` |/ _ \ |_ / _` |
| (_| | |_) | (_| (_| |  __/  _| (_| |
 \__,_|_.__/ \___\__,_|\___|_|  \__, |
                                |___/ 
";

            Assert.AreEqual(expected, lines);
        }
Exemplo n.º 11
0
        public void Test_words_Varsity_Font()
        {
            var figlet = new Figlet(fontFile: Figlet.Fonts.Varsity, smushMode: SmushMode.Kern);

            figlet.Add("Word One!");

            var lines    = figlet.Render();
            var expected =
                @" ____      ____                     __     ___                   _  
|_  _|    |_  _|                   |  ]  .'   `.                | | 
  \ \  /\  / / .--.   _ .--.   .--.| |  /  .-.  \ _ .--.  .---. | | 
   \ \/  \/ // .'`\ \[ `/'`\]/ /'`\' |  | |   | |[ `.-. |/ /__\\| | 
    \  /\  / | \__. | | |    | \__/  |  \  `-'  / | | | || \__.,|_| 
     \/  \/   '.__.' [___]    '.__.;__]  `.___.' [___||__]'.__.'(_) 
                                                                    
";

            Assert.AreEqual(expected, lines);
        }
Exemplo n.º 12
0
        public void Test_words_Lean_Font()
        {
            var figlet = new Figlet(fontFile: Figlet.Fonts.Lean, smushMode: SmushMode.Kern);

            figlet.Add("Word One!");

            var lines    = figlet.Render();
            var expected =
                @"                                                                                       
  _/          _/                            _/        _/_/                        _/   
 _/          _/    _/_/    _/  _/_/    _/_/_/      _/    _/  _/_/_/      _/_/    _/    
_/    _/    _/  _/    _/  _/_/      _/    _/      _/    _/  _/    _/  _/_/_/_/  _/     
 _/  _/  _/    _/    _/  _/        _/    _/      _/    _/  _/    _/  _/                
  _/  _/        _/_/    _/          _/_/_/        _/_/    _/    _/    _/_/_/  _/       
                                                                                       
                                                                                       
";

            Assert.AreEqual(expected, lines);
        }
Exemplo n.º 13
0
        public void Test_words_Big_Font()
        {
            var figlet = new Figlet(fontFile: Figlet.Fonts.Big, smushMode: SmushMode.Kern);

            figlet.Add("Word One!");

            var lines    = figlet.Render();
            var expected =
                @"__          __              _    ____                _ 
\ \        / /             | |  / __ \              | |
 \ \  /\  / /___   _ __  __| | | |  | | _ __    ___ | |
  \ \/  \/ // _ \ | '__|/ _` | | |  | || '_ \  / _ \| |
   \  /\  /| (_) || |  | (_| | | |__| || | | ||  __/|_|
    \/  \/  \___/ |_|   \__,_|  \____/ |_| |_| \___|(_)
                                                       
                                                       
";

            Assert.AreEqual(expected, lines);
        }