mirror of
https://github.com/ascii-boxes/boxes.git
synced 2025-03-04 09:11:24 +01:00
Add test for generating a colored unicode box which
includes some double-wide characters
This commit is contained in:
parent
6cea61c327
commit
2984cda0ca
47
test/177_utf8_generate_box.cfg
Normal file
47
test/177_utf8_generate_box.cfg
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# This config contains UTF-8-encoded elements used correctly, and a simple colored box design.
|
||||||
|
|
||||||
|
BOX designA
|
||||||
|
|
||||||
|
sample
|
||||||
|
┏━┳━ [38;5;154m沐[0m[38;5;184m宸[0m[38;5;184m [0m[38;5;184m若[0m[38;5;214m汐[0m ━┓
|
||||||
|
┃ ┃ ┋
|
||||||
|
┃ ┃ ┃
|
||||||
|
┃ ┃ ┋
|
||||||
|
┣━╋━━━━━━━━━━━━━┫
|
||||||
|
┗━┻━━━━━━━━━━━━━┛
|
||||||
|
ends
|
||||||
|
|
||||||
|
# Monochrome sample (with UTF-8):
|
||||||
|
# ┏━┳━ 沐宸 若汐 ━┓
|
||||||
|
# ┃ ┃ ┋
|
||||||
|
# ┃ ┃ ┃
|
||||||
|
# ┃ ┃ ┋
|
||||||
|
# ┣━╋━━━━━━━━━━━━━┫
|
||||||
|
# ┗━┻━━━━━━━━━━━━━┛
|
||||||
|
|
||||||
|
shapes {
|
||||||
|
n (" [38;5;154m沐[0m[38;5;184m宸[0m[38;5;184m [0m[38;5;184m若[0m[38;5;214m汐[0m ",
|
||||||
|
" ")
|
||||||
|
nw ("┏━┳", "┃ ┃")
|
||||||
|
nnw ("━", " ")
|
||||||
|
nne ("━", " ")
|
||||||
|
ne ("┓", "┋")
|
||||||
|
e ("┃", "┋")
|
||||||
|
w ("┃ ┃")
|
||||||
|
se ("┫", "┛")
|
||||||
|
s ("━", "━")
|
||||||
|
sw ("┣━╋", "┗━┻")
|
||||||
|
}
|
||||||
|
|
||||||
|
elastic (
|
||||||
|
nnw, nne, e, w, s
|
||||||
|
)
|
||||||
|
|
||||||
|
padding {
|
||||||
|
horiz 1
|
||||||
|
}
|
||||||
|
|
||||||
|
replace "ä" with "ö"
|
||||||
|
reverse "ö" to "ä"
|
||||||
|
|
||||||
|
END designA
|
17
test/177_utf8_generate_box.txt
Normal file
17
test/177_utf8_generate_box.txt
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
:ENV
|
||||||
|
export TERM="xterm-color"
|
||||||
|
:ARGS
|
||||||
|
-f 177_utf8_generate_box.cfg -s 21x8 -ac
|
||||||
|
:INPUT
|
||||||
|
fäo
|
||||||
|
:OUTPUT-FILTER
|
||||||
|
:EXPECTED
|
||||||
|
┏━┳━━━ [38;5;154m沐[0m[38;5;184m宸[0m[38;5;184m [0m[38;5;184m若[0m[38;5;214m汐[0m ━━━┓
|
||||||
|
┃ ┃ ┋
|
||||||
|
┃ ┃ ┃
|
||||||
|
┃ ┃ föo ┋
|
||||||
|
┃ ┃ ┃
|
||||||
|
┃ ┃ ┋
|
||||||
|
┣━╋━━━━━━━━━━━━━━━━━┫
|
||||||
|
┗━┻━━━━━━━━━━━━━━━━━┛
|
||||||
|
:EOF
|
Loading…
Reference in New Issue
Block a user