Add doctests for dragon-and-cow cowfile

Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
This commit is contained in:
Thomas A. Christensen II 2021-11-23 12:50:32 -06:00
parent 2578872831
commit 208caf8dfa
Signed by: millironx
GPG key ID: 139C07724802BC5D
2 changed files with 31 additions and 3 deletions

View file

@ -19,4 +19,5 @@ Cowsay.blowfish
```@docs
Cowsay.bunny
Cowsay.dragon_and_cow
```

View file

@ -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 =
"""