store(&NAME) '041 - long context and deadkeys'
c Description: Tests that we don't split a dk in context:set. Note that we start with a context
c with length MAXCONTEXT-1 (abc...fgh is 60 characters/bytes long + 3 bytes for dk(1)).
c keys: [K_Z][K_1][K_2][K_3][K_4]
c context:
c expected: PASS

store(&version) '6.0'

begin Unicode > use(Main)

group(Main) using keys

c Setup
+ [K_Z] > dk(1) 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh'

c Test 1
dk(1) 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh' + '1' > context '1'

c Test 2: Test that we haven't split a deadkey code: UC_SENTINEL CODE_DEADKEY <deadkey_number>
c         because: CODE_DEADKEY = U+0008; deadkey_number = U+0001
U+0008 U+0001 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh1' + '2' > 'FAIL TEST 2'
U+0001 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh1' + '2' > 'FAIL TEST 2'
'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh1' + '2' > context '2'

c Test 3: Test that we haven't split a deadkey code: UC_SENTINEL CODE_DEADKEY <deadkey_number>
c         because: CODE_DEADKEY = U+0008; deadkey_number = U+0001
U+0008 U+0001 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh12' + '3' > 'FAIL TEST 3'
U+0001 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh12' + '3' > 'FAIL TEST 3'
'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh12' + '3' > 'abcdefghijklmnopqrstuvwxyz123'

c Convert to a visible result:
dk(1) 'abcdefghijklmnopqrstuvwxyz123' + '4' > 'PASS'
