blob: 1d0a2032581fed1f8fe97a31eac59e3174e02104 [file] [log] [blame]
#!tools/lou_checkyaml
# A collection of tests related to whether or not it is needed to
# define characters and braille cells (in character definition rules)
# in order to be able to use them in other rules.
# A cell in a multi-cell character definition does not need to be defined in its own character definition.
# It works as long as there is a display rule to display the cell in the output...
table: |
display x 2
sign a 1
sign b 1-2
# ... or as long as the cell does not end up in output.
table: |
sign x 3
sign a 1
sign b 1-2
noback pass2 @2 @3
nofor pass2 @3 @2
flags: {testmode: bothDirections}
tests:
- - b
- ax
# If a cell ends up in the output and can not be displayed, it results in an error.
# FIXME: use the expectedError flag (https://github.com/liblouis/liblouis/issues/875)
# table: |
# sign a 1
# sign b 1-2
# flags: {testmode: forward}
# tests:
# - - b
# - "a "
# A braille cell used in a begcapsword rule does not need to be previously defined in a character definition rule.
# It works as long as there is a display rule to display the cell in the output...
table: |
display x 2
uplow Aa 1
begcapsword 2
# ... or as long as the cell does not end up in output.
table: |
sign x 3
uplow Aa 1
begcapsword 2
noback pass2 @2 @3
nofor pass2 @3 @2
flags: {testmode: bothDirections}
tests:
- - AA
- xaa
# If a cell ends up in the output and can not be displayed, it results in an error.
# FIXME: use the expectedError flag (https://github.com/liblouis/liblouis/issues/875)
# table: |
# uplow Aa 1
# begcapsword 2
# flags: {testmode: forward}
# tests:
# - - AA
# - " aa"
# Characters or braille cells used in a context rule do not need to be previously defined in character definition rules.
table: |
display x 1
noback context "a" @1
nofor context @1 "a"
flags: {testmode: bothDirections}
tests:
- - a
- x
# A character used in a class or swap name does not need to be previously defined in a character definition rule.
table: |
sign a 1
sign b 2
sign c 3
class foo a
swapcd bar b 3
noback context %foo @3
noback context %bar %bar
flags: {testmode: forward}
tests:
- - a
- c
- - b
- c
# A character that is assigned to a class does not need to be previously defined in a character definition rule.
table: |
display x 1
class foo a
noback context %foo @1
flags: {testmode: forward}
tests:
- - a
- x
# Characters in a hyphenation pattern do not need to be previously defined in character definition rules.
table: |
letter a 1
letter b 2
include issue-332_hyph.dic # a1b
flags: {testmode: hyphenate}
tests:
- - aaabbb
- aaa-bbb
# Characters or braille cells used in a always rule do not need to be previously defined in character definition rules.
# It works as long as there is a display rule to display the cell in the output...
table: |
display x 2
always a 2-2
# ... or as long as the cell does not end up in output.
table: |
sign x 3
always a 2-2
noback pass2 @2 @3
nofor pass2 @3 @2
flags: {testmode: bothDirections}
tests:
- - a
- xx
# If a cell ends up in the output and can not be displayed, it results in an error.
# FIXME: use the expectedError flag (https://github.com/liblouis/liblouis/issues/875)
# table: |
# always a 2
# flags: {testmode: forward}
# tests:
# - - a
# - " "