FORWARDDELETE_TESTS = { 'id': 'FD', 'caption': 'Forward-Delete Tests', 'command': 'forwardDelete', 'checkAttrs': True, 'checkStyle': False, 'Proposed': [ { 'desc': '', 'tests': [ ] }, { 'desc': 'forward-delete single characters', 'tests': [ { 'id': 'CHAR-1_SC', 'desc': 'Delete 1 character', 'pad': 'foo^barbaz', 'expected': 'foo^arbaz' }, { 'id': 'CHAR-2_SC', 'desc': 'Delete 1 pre-composed character o with diaeresis', 'pad': 'fo^öbarbaz', 'expected': 'fo^barbaz' }, { 'id': 'CHAR-3_SC', 'desc': 'Delete 1 character with combining diaeresis above', 'pad': 'fo^öbarbaz', 'expected': 'fo^barbaz' }, { 'id': 'CHAR-4_SC', 'desc': 'Delete 1 character with combining diaeresis below', 'pad': 'fo^o̤barbaz', 'expected': 'fo^barbaz' }, { 'id': 'CHAR-5_SC', 'desc': 'Delete 1 character with combining diaeresis above and below', 'pad': 'fo^ö̤barbaz', 'expected': 'fo^barbaz' }, { 'id': 'CHAR-6_SC', 'desc': 'Delete 1 character with enclosing square', 'pad': 'fo^o⃞barbaz', 'expected': 'fo^barbaz' }, { 'id': 'CHAR-7_SC', 'desc': 'Delete 1 character with combining long solidus overlay', 'pad': 'fo^o̸barbaz', 'expected': 'fo^barbaz' } ] }, { 'desc': 'forward-delete text selections', 'tests': [ { 'id': 'TEXT-1_SI', 'desc': 'Delete text selection', 'pad': 'foo[bar]baz', 'expected': 'foo^baz' }, { 'id': 'B-1_SE', 'desc': 'Forward-delete at end of span', 'pad': 'foobar^baz', 'expected': 'foobar^az' }, { 'id': 'B-1_SB', 'desc': 'Forward-delete from position before span', 'pad': 'foo^barbaz', 'expected': 'foo^arbaz' }, { 'id': 'B-1_SW', 'desc': 'Delete selection that wraps the whole span content', 'pad': 'foo[bar]baz', 'expected': 'foo^baz' }, { 'id': 'B-1_SO', 'desc': 'Delete selection that wraps the whole span', 'pad': 'foo[bar]baz', 'expected': 'foo^baz' }, { 'id': 'B-1_SL', 'desc': 'Delete oblique selection that starts before span', 'pad': 'foo[barbaz]quozquuz', 'expected': 'foo^quozquuz' }, { 'id': 'B-1_SR', 'desc': 'Delete oblique selection that ends after span', 'pad': 'foobar[bazquoz]quuz', 'expected': 'foobar^quuz' }, { 'id': 'B.I-1_SM', 'desc': 'Delete oblique selection that starts and ends in different spans', 'pad': 'foobar[bazqoz]quuzquuuz', 'expected': 'foobar^quuzquuuz' }, { 'id': 'GEN-1_SE', 'desc': 'Delete at end of span with generated content', 'pad': 'foobar^baz', 'expected': 'foobar^az' }, { 'id': 'GEN-1_SB', 'desc': 'Delete from position before span with generated content', 'pad': 'foo^barbaz', 'expected': 'foo^arbaz' } ] }, { 'desc': 'forward-delete paragraphs', 'tests': [ { 'id': 'P2-1_SE1', 'desc': 'Delete from collapsed selection at end of paragraph - should merge with next', 'pad': '

foobar^

bazqoz

', 'expected': '

foobar^bazqoz

' }, { 'id': 'P2-1_SI1', 'desc': 'Delete non-collapsed selection at end of paragraph - should not merge with next', 'pad': '

foo[bar]

bazqoz

', 'expected': '

foo^

bazqoz

' }, { 'id': 'P2-1_SM', 'desc': 'Delete non-collapsed selection spanning 2 paragraphs - should merge them', 'pad': '

foo[bar

baz]qoz

', 'expected': '

foo^qoz

' } ] }, { 'desc': 'forward-delete lists and list items', 'tests': [ { 'id': 'OL-LI2-1_SO1', 'desc': 'Delete fully wrapped list item', 'pad': 'foo
    {
  1. bar
  2. }
  3. baz
qoz', 'expected': ['foo
    |
  1. baz
qoz', 'foo
  1. ^baz
qoz'] }, { 'id': 'OL-LI2-1_SM', 'desc': 'Delete oblique range between list items within same list', 'pad': 'foo
  1. ba[r
  2. b]az
qoz', 'expected': 'foo
  1. ba^az
qoz' }, { 'id': 'OL-LI-1_SW', 'desc': 'Delete contents of last list item (list should remain)', 'pad': 'foo
  1. [foo]
qoz', 'expected': ['foo
  1. |
qoz', 'foo
  1. ^
qoz'] }, { 'id': 'OL-LI-1_SO', 'desc': 'Delete last list item of list (should remove entire list)', 'pad': 'foo
    {
  1. foo
  2. }
qoz', 'expected': 'foo^qoz' } ] }, { 'desc': 'forward-delete with strange selections', 'tests': [ { 'id': 'HR.BR-1_SM', 'desc': 'Delete selection that starts and ends within nodes that don\'t have children', 'pad': 'foo
bar
baz', 'expected': 'foo
|
baz' } ] }, { 'desc': 'forward-delete from immediately before a table', 'tests': [ { 'id': 'TABLE-1_SB', 'desc': 'Delete from position immediately before table (should have no effect)', 'pad': 'foo^
bar
baz', 'expected': 'foo^
bar
baz' } ] }, { 'desc': 'forward-delete within table cells', 'tests': [ { 'id': 'TD-1_SE', 'desc': 'Delete from end of last cell (should have no effect)', 'pad': 'foo
bar^
baz', 'expected': 'foo
bar^
baz' }, { 'id': 'TD2-1_SE1', 'desc': 'Delete from end of inner cell (should have no effect)', 'pad': 'foo
bar^baz
quoz', 'expected': 'foo
bar^baz
quoz' }, { 'id': 'TD2-1_SM', 'desc': 'Delete with selection spanning 2 cells', 'pad': 'foo
ba[rb]az
quoz', 'expected': 'foo
ba^az
quoz' } ] }, { 'desc': 'forward-delete table rows', 'tests': [ { 'id': 'TR3-1_SO1', 'desc': 'Delete first table row', 'pad': '{}
A
B
C
', 'expected': ['|
B
C
', '
^B
C
'] }, { 'id': 'TR3-1_SO2', 'desc': 'Delete middle table row', 'pad': '{}
A
B
C
', 'expected': ['|
A
C
', '
A
^C
'] }, { 'id': 'TR3-1_SO3', 'desc': 'Delete last table row', 'pad': '{}
A
B
C
', 'expected': ['|
A
B
', '
A
B^
'] }, { 'id': 'TR2rs:2-1_SO1', 'desc': 'Delete first table row where a cell has rowspan 2', 'pad': '{}
AR
B
', 'expected': ['|
BR
', '
^BR
'] }, { 'id': 'TR2rs:2-1_SO2', 'desc': 'Delete second table row where a cell has rowspan 2', 'pad': '{}
AR
B
', 'expected': ['|
AR
', '
AR^
'] }, { 'id': 'TR3rs:3-1_SO1', 'desc': 'Delete first table row where a cell has rowspan 3', 'pad': '{}
AR
B
C
', 'expected': ['|
AR
C
', '
^AR
C
'] }, { 'id': 'TR3rs:3-1_SO2', 'desc': 'Delete middle table row where a cell has rowspan 3', 'pad': '{}
AR
B
C
', 'expected': ['|
BR
C
', '
BR
^C
'] }, { 'id': 'TR3rs:3-1_SO3', 'desc': 'Delete last table row where a cell has rowspan 3', 'pad': '{}
AR
B
C
', 'expected': ['|
AR
B
', '
AR
B^
'] } ] }, { 'desc': 'delete with non-editable nested content', 'tests': [ { 'id': 'DIV:ce:false-1_SO', 'desc': 'Delete nested non-editable
', 'pad': 'foo[bar
NESTED
baz]qoz', 'expected': 'foo^qoz' }, { 'id': 'DIV:ce:false-1_SB', 'desc': 'Delete from immediately before a nested non-editable
', 'pad': 'foobar^
NESTED
bazqoz', 'expected': 'foobar^bazqoz' }, { 'id': 'DIV:ce:false-1_SL', 'desc': 'Delete nested non-editable
with oblique selection', 'pad': 'foo[bar
NES]TED
bazqoz', 'expected': [ 'foo^
NESTED
bazqoz', 'foo
[NES]TED
bazqoz' ] }, { 'id': 'DIV:ce:false-1_SR', 'desc': 'Delete nested non-editable
with oblique selection', 'pad': 'foobar
NES[TED
baz]qoz', 'expected': [ 'foobar
NESTED
^qoz', 'foobar
NES[TED]
qoz' ] }, { 'id': 'DIV:ce:false-1_SI', 'desc': 'Delete inside nested non-editable
(should be no-op)', 'pad': 'foobar
NE[ST]ED
bazqoz', 'expected': 'foobar
NE[ST]ED
bazqoz' } ] }, { 'desc': 'Delete with display:inline-block', 'checkStyle': True, 'tests': [ { 'id': 'SPAN:d:ib-1_SC', 'desc': 'Delete inside an inline-block ', 'pad': 'foobar^bazqoz', 'expected': 'foobar^azqoz' }, { 'id': 'SPAN:d:ib-1_SA', 'desc': 'Delete from immediately before an inline-block ', 'pad': 'foo^barbazqoz', 'expected': 'foo^arbazqoz' }, { 'id': 'SPAN:d:ib-2_SL', 'desc': 'Delete with nested inline-block , oblique selection', 'pad': 'foo[DELETE]barbaz', 'expected': 'foo^barbaz' }, { 'id': 'SPAN:d:ib-3_SR', 'desc': 'Delete with nested inline-block , oblique selection', 'pad': 'foobar[DELETE]baz', 'expected': 'foobar^baz' }, { 'id': 'SPAN:d:ib-4i_SI', 'desc': 'Delete with nested inline-block , oblique selection', 'pad': 'foobar[DELETE]bazqoz', 'expected': 'foobar^bazqoz' }, { 'id': 'SPAN:d:ib-4l_SI', 'desc': 'Delete with nested inline-block , oblique selection', 'pad': 'foo[DELETE]barbazqoz', 'expected': 'foo^barbazqoz' }, { 'id': 'SPAN:d:ib-4r_SI', 'desc': 'Delete with nested inline-block , oblique selection', 'pad': 'foobarbaz[DELETE]qoz', 'expected': 'foobarbaz^qoz' } ] } ] }