From 825c66365a4e33ee155c1d29e0453714977d51ca Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 10 May 2022 19:46:40 -0500 Subject: [PATCH] Add tests for cow modes Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- test/runtests.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index 7721e2e..ec087d5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -38,4 +38,15 @@ DocMeta.setdocmeta!(Cowsay, :DocTestSetup, :(using Cowsay); recursive=true) # Long text, different wrap amount @test cowsaid("Rollin' down a long highway out through New Mexico driftin' down to Santa Fe to ride a bull in a rodeo", wrap=80) == " _________________________________________________________________________________\n/ Rollin' down a long highway out through New Mexico driftin' down to Santa Fe to \\\n\\ ride a bull in a rodeo /\n ---------------------------------------------------------------------------------\n \\ ^__^\n \\ (oo)\\_______\n (__)\\ )\\/\\\n ||----w |\n || ||\n" end + @testset "Cow Modes" begin + @test Cowsay.construct_face!("oo", " ") == ("oo", " ") + @test Cowsay.construct_face!("oo", " "; borg=true) == ("==", " ") + @test Cowsay.construct_face!("oo", " "; dead=true) == ("xx", "U ") + @test Cowsay.construct_face!("oo", " "; greedy=true) == ("\$\$", " ") + @test Cowsay.construct_face!("oo", " "; paranoid=true) == ("@@", " ") + @test Cowsay.construct_face!("oo", " "; stoned=true) == ("**", "U ") + @test Cowsay.construct_face!("oo", " "; tired=true) == ("--", " ") + @test Cowsay.construct_face!("oo", " "; wired=true) == ("OO", " ") + @test Cowsay.construct_face!("oo", " "; young=true) == ("..", " ") + end end