# frozen_string_literal: true require_relative "../lib/az/kernel_method" require "minitest/autorun" describe "az" do it "will always return an String" do assert_kind_of String, az("") end it "will replace A-Z with Unicode characters which represent latin letters but in a different way" do assert_equal "๐œ๐ก๐š๐ซ๐š๐œ๐ญ๐ž๐ซ.๐œ๐จ๐ง๐ฌ๐ญ๐ซ๐ฎ๐œ๐ญ๐ข๐จ๐ง", az("character.construction", :bold) end it "does nothing if no font (2nd parameter) is passed in" do assert_equal "character.construction", az("character.construction") end it "works with every included font" do assert_equal "๐…๐ซ๐จ๐ฆ ๐€ ๐ญ๐จ ๐™", az("From A to Z", :bold) assert_equal "๐น๐‘Ÿ๐‘œ๐‘š ๐ด ๐‘ก๐‘œ ๐‘", az("From A to Z", :italic) assert_equal "๐‘ญ๐’“๐’๐’Ž ๐‘จ ๐’•๐’ ๐’", az("From A to Z", :bold_italic) assert_equal "๐‘ญ๐’“๐’๐’Ž ๐‘จ ๐’•๐’ ๐’", az("From A to Z", :italic_bold) assert_equal "๐™ต๐š›๐š˜๐š– ๐™ฐ ๐š๐š˜ ๐š‰", az("From A to Z", :monospace) assert_equal "๏ผฆ๏ฝ’๏ฝ๏ฝ ๏ผก ๏ฝ”๏ฝ ๏ผบ", az("From A to Z", :double) assert_equal "๐–ฅ๐—‹๐—ˆ๐—† ๐–  ๐—๐—ˆ ๐–น", az("From A to Z", :sans) assert_equal "๐—™๐—ฟ๐—ผ๐—บ ๐—” ๐˜๐—ผ ๐—ญ", az("From A to Z", :sans_bold) assert_equal "๐˜๐˜ณ๐˜ฐ๐˜ฎ ๐˜ˆ ๐˜ต๐˜ฐ ๐˜ก", az("From A to Z", :sans_italic) assert_equal "๐™๐™ง๐™ค๐™ข ๐˜ผ ๐™ฉ๐™ค ๐™•", az("From A to Z", :sans_bold_italic) assert_equal "๐™๐™ง๐™ค๐™ข ๐˜ผ ๐™ฉ๐™ค ๐™•", az("From A to Z", :sans_italic_bold) assert_equal "โ„ฑ๐“‡โ„ด๐“‚ ๐’œ ๐“‰โ„ด ๐’ต", az("From A to Z", :script) assert_equal "๐“•๐“ป๐“ธ๐“ถ ๐“ ๐“ฝ๐“ธ ๐“ฉ", az("From A to Z", :bold_script) assert_equal "๐“•๐“ป๐“ธ๐“ถ ๐“ ๐“ฝ๐“ธ ๐“ฉ", az("From A to Z", :script_bold) assert_equal "๐”‰๐”ฏ๐”ฌ๐”ช ๐”„ ๐”ฑ๐”ฌ โ„จ", az("From A to Z", :fraktur) assert_equal "๐•ฑ๐–—๐–”๐–’ ๐•ฌ ๐–™๐–” ๐–…", az("From A to Z", :bold_fraktur) assert_equal "๐•ฑ๐–—๐–”๐–’ ๐•ฌ ๐–™๐–” ๐–…", az("From A to Z", :fraktur_bold) assert_equal "๐Ÿ„•โ’ญโ’ชโ’จ ๐Ÿ„ โ’ฏโ’ช ๐Ÿ„ฉ", az("From A to Z", :parentheses) assert_equal "Fส€แดแด A แด›แด Z", az("From A to Z", :small_caps) assert_equal "๐”ฝ๐•ฃ๐• ๐•ž ๐”ธ ๐•ฅ๐•  โ„ค", az("From A to Z", :double_struck) assert_equal "โ’ปโ“กโ“žโ“œ โ’ถ โ“ฃโ“ž โ“", az("From A to Z", :circled) assert_equal "โ’ปโ“‡โ“„โ“‚ โ’ถ โ“‰โ“„ โ“", az("From A to Z", :circled_upper) assert_equal "โ’ปโ“‡โ“„โ“‚ โ’ถ โ“‰โ“„ โ“", az("From A to Z", :upper_circled) assert_equal "๐Ÿ…•๐Ÿ…ก๐Ÿ…ž๐Ÿ…œ ๐Ÿ… ๐Ÿ…ฃ๐Ÿ…ž ๐Ÿ…ฉ", az("From A to Z", :circled_negative) assert_equal "๐Ÿ…•๐Ÿ…ก๐Ÿ…ž๐Ÿ…œ ๐Ÿ… ๐Ÿ…ฃ๐Ÿ…ž ๐Ÿ…ฉ", az("From A to Z", :negative_circled) assert_equal "๐Ÿ„ต๐Ÿ…๐Ÿ„พ๐Ÿ„ผ ๐Ÿ„ฐ ๐Ÿ…ƒ๐Ÿ„พ ๐Ÿ…‰", az("From A to Z", :squared_upper) assert_equal "๐Ÿ„ต๐Ÿ…๐Ÿ„พ๐Ÿ„ผ ๐Ÿ„ฐ ๐Ÿ…ƒ๐Ÿ„พ ๐Ÿ…‰", az("From A to Z", :upper_squared) assert_equal "๐Ÿ…ต๐Ÿ†๐Ÿ…พ๐Ÿ…ผ ๐Ÿ…ฐ ๐Ÿ†ƒ๐Ÿ…พ ๐Ÿ†‰", az("From A to Z", :squared_negative) assert_equal "๐Ÿ…ต๐Ÿ†๐Ÿ…พ๐Ÿ…ผ ๐Ÿ…ฐ ๐Ÿ†ƒ๐Ÿ…พ ๐Ÿ†‰", az("From A to Z", :negative_squared) assert_equal "๐Ÿ‡ซ๐Ÿ‡ท๐Ÿ‡ด๐Ÿ‡ฒ ๐Ÿ‡ฆ ๐Ÿ‡น๐Ÿ‡ด ๐Ÿ‡ฟ", az("From A to Z", :region) assert_equal "๓ †๓ ฒ๓ ฏ๓ ญ ๓  ๓ ด๓ ฏ ๓ š", az("From A to Z", :tag) end it "works to convert an h to italic" do assert_equal "๐‘โ„Ž๐‘Ž๐‘Ÿ๐‘Ž๐‘๐‘ก๐‘’๐‘Ÿ.๐‘๐‘œ๐‘›๐‘ ๐‘ก๐‘Ÿ๐‘ข๐‘๐‘ก๐‘–๐‘œ๐‘›", az("character.construction", :italic) end end describe "Az.fonts" do it "will return a list of all available 'fonts'" do assert_kind_of Array, Az.fonts assert_includes Az.fonts, :italic end end