duckscript/test/std/println_test.ds

22 lines
631 B
Plaintext

fn test_no_style
count = println hello world "1 2 3"
assert_eq ${count} 3
end
fn test_with_style
count = println -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