mirror of
https://github.com/sagiegurari/duckscript
synced 2024-10-14 03:42:32 +00:00
22 lines
629 B
Plaintext
22 lines
629 B
Plaintext
|
|
fn test_no_style
|
|
count = println hello world "1 2 3"
|
|
|
|
assert_eq ${count} 3
|
|
end
|
|
|
|
fn test_with_style
|
|
count = print -s bold -s underline -s italic -s dimmed -s blink --style strikethrough --color bright_green --background-color red bright_green red
|
|
assert_eq ${count} 2
|
|
|
|
colors = array black red green yellow blue magenta cyan white
|
|
for color in ${colors}
|
|
count = println -c ${color} -bgc ${color} ${color}
|
|
assert_eq ${count} 1
|
|
count = println --color bright_${color} --background-color bright_${color} bright_${color}
|
|
assert_eq ${count} 1
|
|
end
|
|
release ${colors}
|
|
end
|
|
|