From 208caf8dfae71d11bf81595ee987a197f29be64f Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 23 Nov 2021 12:50:32 -0600 Subject: [PATCH] Add doctests for dragon-and-cow cowfile Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- docs/src/cows.md | 1 + src/cows/dragon-and-cow.cow.jl | 33 ++++++++++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/docs/src/cows.md b/docs/src/cows.md index c2d68f9..0e4f991 100644 --- a/docs/src/cows.md +++ b/docs/src/cows.md @@ -19,4 +19,5 @@ Cowsay.blowfish ```@docs Cowsay.bunny +Cowsay.dragon_and_cow ``` diff --git a/src/cows/dragon-and-cow.cow.jl b/src/cows/dragon-and-cow.cow.jl index abfc999..b9542b0 100644 --- a/src/cows/dragon-and-cow.cow.jl +++ b/src/cows/dragon-and-cow.cow.jl @@ -1,6 +1,33 @@ -## -## A dragon smiting a cow, possible credit to kube@csua.berkeley.edu -## +""" + function dragon_and_cow() + +A dragon smiting a cow, possible credit to kube@csua.berkeley.edu + +# Example + +```jldoctest +julia> cowsay("Roast beef: it's what's for dinner", cow=Cowsay.dragon_and_cow) + ____________________________________ +< Roast beef: it's what's for dinner > + ------------------------------------ + \\ ^ /^ + \\ / \\ // \\ + \\ |\\___/| / \\// .\\ + \\ /O O \\__ / // | \\ \\ *----* + / / \\/_/ // | \\ \\ \\ | + @___@` \\/_ // | \\ \\ \\/\\ \\ + 0/0/| \\/_ // | \\ \\ \\ \\ + 0/0/0/0/| \\/// | \\ \\ | | + 0/0/0/0/0/_|_ / ( // | \\ _\\ | / + 0/0/0/0/0/0/`/,_ _ _/ ) ; -. | _ _\\.-~ / / + ,-} _ *-.|.-~-. .~ ~ + \\ \\__/ `/\\ / ~-. _ .-~ / + \\____(oo) *. } { / + ( (--) .----~-.\\ \\-` .~ + //__\\\\ \\__ Ack! ///.----..< \\ _ -~ + // \\\\ ///-._ _ _ _ _ _ _{^ - - - - ~ +``` +""" function dragon_and_cow(;eyes="oo", tongue=" ", thoughts="\\") the_cow = """