Commit 7a27ce1c authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Initial checkin.

parent a23d7d9c
# Test for a bug where find_block tested the Text_no value instead of
# the Local_text_no value. The bug is now fixed.
l2g_start
l2g_send "I0"
l2g_send "a0 700 100"
l2g_send "a0 800 108"
l2g_send "l0 699"
simple_expect "0" "test 0"
l2g_send "l0 700"
simple_expect "100" "test 1"
l2g_send "l0 701"
simple_expect "0" "test 2"
l2g_send "l0 799"
simple_expect "0" "test 3"
l2g_send "l0 800"
simple_expect "108" "test 4"
l2g_send "l0 801"
simple_expect "0" "test 5"
l2g_send "l0 100"
simple_expect "0" "test 6"
l2g_send "l0 108"
simple_expect "0" "test 7"
l2g_send "u0"
simple_expect "Number of blocks: 1" "test 8"
simple_expect "First unused: 801" "test 8b"
simple_expect "0: 2 8 700 \\(sparse\\) \\\[700:100 800:108 \\\]" "test 9"
l2g_stop
# Check that iterators don't return a local text number that has been
# deleted in a sparse block.
l2g_start
l2g_send "I0"
l2g_send "a0 700 100"
l2g_send "a0 750 103"
l2g_send "a0 800 108"
l2g_send "u0"
simple_expect "Number of blocks: 1" "test 0"
simple_expect "First unused: 801" "test 0b"
simple_expect "0: 3 7 700 \\(sparse\\) \\\[700:100 750:103 800:108 \\\]" "test 1"
l2g_send "d0 750"
l2g_send "u0"
simple_expect "Number of blocks: 1" "test 2"
simple_expect "First unused: 801" "test 2b"
simple_expect "0: 3 8 700 \\(sparse\\) \\\[700:100 750:0 800:108 \\\]" "test 3"
l2g_send "l0 699"
simple_expect "0" "test 4"
l2g_send "l0 700"
simple_expect "100" "test 5"
l2g_send "l0 701"
simple_expect "0" "test 6"
l2g_send "l0 799"
simple_expect "0" "test 7"
l2g_send "l0 800"
simple_expect "108" "test 8"
l2g_send "l0 801"
simple_expect "0" "test 9"
l2g_send "l0 100"
simple_expect "0" "test 10"
l2g_send "l0 108"
simple_expect "0" "test 11"
l2g_send "n0 699"
simple_expect "700" "test 12"
l2g_send "n0 700"
simple_expect "800" "test 13"
l2g_send "n0 701"
simple_expect "800" "test 14"
l2g_send "n0 799"
simple_expect "800" "test 15"
l2g_send "n0 800"
simple_expect "0" "test 16"
l2g_send "n0 801"
simple_expect "0" "test 17"
l2g_send "n0 100"
simple_expect "700" "test 18"
l2g_send "n0 750"
simple_expect "800" "test 19"
l2g_send "n0 749"
simple_expect "800" "test 20"
l2g_stop
# Check that no junk is read from a dense unfilled block.
l2g_start
l2g_send "I0"
l2g_send "a0 10 100"
l2g_send "a0 11 102"
l2g_send "a0 12 104"
l2g_send "a0 13 106"
l2g_send "a0 14 108"
l2g_send "a0 15 110"
l2g_send "a0 16 112"
l2g_send "a0 17 114"
l2g_send "a0 18 116"
# 19 not filled in.
l2g_send "l0 18"
simple_expect "116" "test 0"
l2g_send "l0 19"
simple_expect "0" "test 1"
l2g_send "a0 20 118"
l2g_send "l0 19"
simple_expect "0" "test 2"
l2g_send "l0 20"
simple_expect "118" "test 3"
l2g_send "u0"
simple_expect "Number of blocks: 2" "test 4"
simple_expect "First unused: 21" "test 4b"
simple_expect "0: 9 1 10 \\(dense\\) \\\[100 102 104 106 108 110 112 114 116 \\\]" "test 5"
simple_expect "1: 1 9 20 \\(dense\\) \\\[118 \\\]" "test 6"
l2g_stop
# Check that a sparse block is created even when the last block was a
# dense block in which the last position was used.
l2g_start
l2g_send "I0"
l2g_send "a0 90 107"
l2g_send "a0 99 116"
l2g_send "a0 100 117"
l2g_send "u0"
simple_expect "Number of blocks: 1" "test 0"
simple_expect "First unused: 101" "test 0b"
simple_expect "0: 3 7 90 \\(sparse\\) \\\[90:107 99:116 100:117 \\\]" "test 1"
l2g_stop
# Make sure that deleting a non-existing text in a block doesn't
# leave the block in an invalid state.
l2g_start
# Dense block.
l2g_send "I0"
l2g_send "a0 90 107"
l2g_send "a0 91 116"
l2g_send "u0"
simple_expect "Number of blocks: 1" "test 0"
simple_expect "First unused: 92" "test 0b"
simple_expect "0: 2 8 90 \\(dense\\) \\\[107 116 \\\]" "test 1"
l2g_send "d0 91"
l2g_send "u0"
simple_expect "Number of blocks: 1" "test 2"
simple_expect "First unused: 92" "test 2b"
simple_expect "0: 2 9 90 \\(dense\\) \\\[107 0 \\\]" "test 3"
l2g_send "d0 91"
l2g_send "u0"
simple_expect "Number of blocks: 1" "test 4"
simple_expect "First unused: 92" "test 4b"
simple_expect "0: 2 9 90 \\(dense\\) \\\[107 0 \\\]" "test 5"
# Sparse block
l2g_send "I1"
l2g_send "a1 90 107"
l2g_send "a1 901 11116"
l2g_send "u1"
simple_expect "Number of blocks: 1" "test 6"
simple_expect "First unused: 902" "test 6b"
simple_expect "0: 2 8 90 \\(sparse\\) \\\[90:107 901:11116 \\\]" "test 7"
l2g_send "d1 901"
l2g_send "u1"
simple_expect "Number of blocks: 1" "test 8"
simple_expect "First unused: 902" "test 8b"
simple_expect "0: 2 9 90 \\(sparse\\) \\\[90:107 901:0 \\\]" "test 9"
l2g_send "d1 91"
l2g_send "u1"
simple_expect "Number of blocks: 1" "test 10"
simple_expect "First unused: 902" "test 10b"
simple_expect "0: 2 9 90 \\(sparse\\) \\\[90:107 901:0 \\\]" "test 11"
l2g_stop
# Test that iterators don't return deleted texts, either first, last,
# or in the middle, regardless of the block type.
l2g_start
l2g_send "I0"
l2g_send "I1"
l2g_send "i0"
# Dense blocks.
for {set i 1} {$i < 45} {incr i} {
l2g_send "a0 $i [expr $i + 1000]"
}
l2g_send "l0 5"
simple_expect "1005" "test 0"
l2g_send "i0"
simple_expect "1:1001" "test 1"
simple_expect "2:1002" "test 2"
simple_expect "3:1003" "test 3"
simple_expect "4:1004" "test 4"
simple_expect "5:1005" "test 5"
simple_expect "6:1006" "test 6"
simple_expect "7:1007" "test 7"
simple_expect "8:1008" "test 8"
simple_expect "9:1009" "test 9"
simple_expect "10:1010" "test 10"
simple_expect "11:1011" "test 11"
simple_expect "12:1012" "test 12"
simple_expect "13:1013" "test 13"
simple_expect "14:1014" "test 14"
simple_expect "15:1015" "test 15"
simple_expect "16:1016" "test 16"
simple_expect "17:1017" "test 17"
simple_expect "18:1018" "test 18"
simple_expect "19:1019" "test 19"
simple_expect "20:1020" "test 20"
simple_expect "21:1021" "test 21"
simple_expect "22:1022" "test 22"
simple_expect "23:1023" "test 23"
simple_expect "24:1024" "test 24"
simple_expect "25:1025" "test 25"
simple_expect "26:1026" "test 26"
simple_expect "27:1027" "test 27"
simple_expect "28:1028" "test 28"
simple_expect "29:1029" "test 29"
simple_expect "30:1030" "test 30"
simple_expect "31:1031" "test 31"
simple_expect "32:1032" "test 32"
simple_expect "33:1033" "test 33"
simple_expect "34:1034" "test 34"
simple_expect "35:1035" "test 35"
simple_expect "36:1036" "test 36"
simple_expect "37:1037" "test 37"
simple_expect "38:1038" "test 38"
simple_expect "39:1039" "test 39"
simple_expect "40:1040" "test 40"
simple_expect "41:1041" "test 41"
simple_expect "42:1042" "test 42"
simple_expect "43:1043" "test 43"
simple_expect "44:1044" "test 44"
l2g_send "i0 1 55"
simple_expect "1:1001" "test 45"
simple_expect "2:1002" "test 46"
simple_expect "3:1003" "test 47"
simple_expect "4:1004" "test 48"
simple_expect "5:1005" "test 49"
simple_expect "6:1006" "test 50"
simple_expect "7:1007" "test 51"
simple_expect "8:1008" "test 52"
simple_expect "9:1009" "test 53"
simple_expect "10:1010" "test 54"
simple_expect "11:1011" "test 55"
simple_expect "12:1012" "test 56"
simple_expect "13:1013" "test 57"
simple_expect "14:1014" "test 58"
simple_expect "15:1015" "test 59"
simple_expect "16:1016" "test 60"
simple_expect "17:1017" "test 61"
simple_expect "18:1018" "test 62"
simple_expect "19:1019" "test 63"
simple_expect "20:1020" "test 64"
simple_expect "21:1021" "test 65"
simple_expect "22:1022" "test 66"
simple_expect "23:1023" "test 67"
simple_expect "24:1024" "test 68"
simple_expect "25:1025" "test 69"
simple_expect "26:1026" "test 70"
simple_expect "27:1027" "test 71"
simple_expect "28:1028" "test 72"
simple_expect "29:1029" "test 73"
simple_expect "30:1030" "test 74"
simple_expect "31:1031" "test 75"
simple_expect "32:1032" "test 76"
simple_expect "33:1033" "test 77"
simple_expect "34:1034" "test 78"
simple_expect "35:1035" "test 79"
simple_expect "36:1036" "test 80"
simple_expect "37:1037" "test 81"
simple_expect "38:1038" "test 82"
simple_expect "39:1039" "test 83"
simple_expect "40:1040" "test 84"
simple_expect "41:1041" "test 85"
simple_expect "42:1042" "test 86"
simple_expect "43:1043" "test 87"
simple_expect "44:1044" "test 88"
l2g_send "i0 1 99"
simple_expect "1:1001" "test 89"
simple_expect "2:1002" "test 90"
simple_expect "3:1003" "test 91"
simple_expect "4:1004" "test 92"
simple_expect "5:1005" "test 93"
simple_expect "6:1006" "test 94"
simple_expect "7:1007" "test 95"
simple_expect "8:1008" "test 96"
simple_expect "9:1009" "test 97"
simple_expect "10:1010" "test 98"
simple_expect "11:1011" "test 99"
simple_expect "12:1012" "test 100"
simple_expect "13:1013" "test 101"
simple_expect "14:1014" "test 102"
simple_expect "15:1015" "test 103"
simple_expect "16:1016" "test 104"
simple_expect "17:1017" "test 105"
simple_expect "18:1018" "test 106"
simple_expect "19:1019" "test 107"
simple_expect "20:1020" "test 108"
simple_expect "21:1021" "test 109"
simple_expect "22:1022" "test 110"
simple_expect "23:1023" "test 111"
simple_expect "24:1024" "test 112"
simple_expect "25:1025" "test 113"
simple_expect "26:1026" "test 114"
simple_expect "27:1027" "test 115"
simple_expect "28:1028" "test 116"
simple_expect "29:1029" "test 117"
simple_expect "30:1030" "test 118"
simple_expect "31:1031" "test 119"
simple_expect "32:1032" "test 120"
simple_expect "33:1033" "test 121"
simple_expect "34:1034" "test 122"
simple_expect "35:1035" "test 123"
simple_expect "36:1036" "test 124"
simple_expect "37:1037" "test 125"
simple_expect "38:1038" "test 126"
simple_expect "39:1039" "test 127"
simple_expect "40:1040" "test 128"
simple_expect "41:1041" "test 129"
simple_expect "42:1042" "test 130"
simple_expect "43:1043" "test 131"
simple_expect "44:1044" "test 132"
l2g_send "i0 12 30"
simple_expect "12:1012" "test 133"
simple_expect "13:1013" "test 134"
simple_expect "14:1014" "test 135"
simple_expect "15:1015" "test 136"
simple_expect "16:1016" "test 137"
simple_expect "17:1017" "test 138"
simple_expect "18:1018" "test 139"
simple_expect "19:1019" "test 140"
simple_expect "20:1020" "test 141"
simple_expect "21:1021" "test 142"
simple_expect "22:1022" "test 143"
simple_expect "23:1023" "test 144"
simple_expect "24:1024" "test 145"
simple_expect "25:1025" "test 146"
simple_expect "26:1026" "test 147"
simple_expect "27:1027" "test 148"
simple_expect "28:1028" "test 149"
simple_expect "29:1029" "test 150"
l2g_send "d0 1"
l2g_send "d0 11"
l2g_send "d0 25"
l2g_send "d0 40"
l2g_send "d0 44"
l2g_send "i0"
simple_expect "2:1002" "test 151"
simple_expect "3:1003" "test 152"
simple_expect "4:1004" "test 153"
simple_expect "5:1005" "test 154"
simple_expect "6:1006" "test 155"
simple_expect "7:1007" "test 156"
simple_expect "8:1008" "test 157"
simple_expect "9:1009" "test 158"
simple_expect "10:1010" "test 159"
simple_expect "12:1012" "test 160"
simple_expect "13:1013" "test 161"
simple_expect "14:1014" "test 162"
simple_expect "15:1015" "test 163"
simple_expect "16:1016" "test 164"
simple_expect "17:1017" "test 165"
simple_expect "18:1018" "test 166"
simple_expect "19:1019" "test 167"
simple_expect "20:1020" "test 168"
simple_expect "21:1021" "test 169"
simple_expect "22:1022" "test 170"
simple_expect "23:1023" "test 171"
simple_expect "24:1024" "test 172"
simple_expect "26:1026" "test 173"
simple_expect "27:1027" "test 174"
simple_expect "28:1028" "test 175"
simple_expect "29:1029" "test 176"
simple_expect "30:1030" "test 177"
simple_expect "31:1031" "test 178"
simple_expect "32:1032" "test 179"
simple_expect "33:1033" "test 180"
simple_expect "34:1034" "test 181"
simple_expect "35:1035" "test 182"
simple_expect "36:1036" "test 183"
simple_expect "37:1037" "test 184"
simple_expect "38:1038" "test 185"
simple_expect "39:1039" "test 186"
simple_expect "41:1041" "test 187"
simple_expect "42:1042" "test 188"
simple_expect "43:1043" "test 189"
l2g_send "u0"
simple_expect "Number of blocks: 5" "test 190"
simple_expect "First unused: 45" "test 191"
simple_expect "0: 10 1 1 \\(dense\\) \\\[0 1002 1003 1004 1005 1006 1007 1008 1009 1010 \\\]" "test 192"
simple_expect "1: 10 1 11 \\(dense\\) \\\[0 1012 1013 1014 1015 1016 1017 1018 1019 1020 \\\]" "test 193"
simple_expect "2: 10 1 21 \\(dense\\) \\\[1021 1022 1023 1024 0 1026 1027 1028 1029 1030 \\\]" "test 194"
simple_expect "3: 10 1 31 \\(dense\\) \\\[1031 1032 1033 1034 1035 1036 1037 1038 1039 0 \\\]" "test 195"
simple_expect "4: 4 7 41 \\(dense\\) \\\[1041 1042 1043 0 \\\]" "test 196"
# Sparse blocks
l2g_send "i1"
# 0:0
l2g_send "a1 66 107"
l2g_send "a1 109 158"
l2g_send "a1 153 215"
l2g_send "a1 180 240"
l2g_send "a1 233 301"
l2g_send "a1 278 361"
l2g_send "a1 330 398"
l2g_send "a1 353 455"
l2g_send "a1 411 434"
l2g_send "a1 448 538"
# 1:0
l2g_send "a1 503 582"
l2g_send "a1 514 580"
l2g_send "a1 542 620"
l2g_send "a1 570 658"
l2g_send "a1 610 677"
l2g_send "a1 659 765"
l2g_send "a1 713 769"
l2g_send "a1 740 808"
l2g_send "a1 799 878"
# 2:0
l2g_send "a1 813 908"
l2g_send "a1 837 927"
l2g_send "a1 876 899"
l2g_send "a1 905 1000"
l2g_send "a1 917 963"
# 2:4
l2g_send "a1 976 1046"
l2g_send "a1 994 1094"
l2g_send "a1 1019 1048"
l2g_send "a1 1052 1129"
l2g_send "a1 1106 1198"
# 2:9
l2g_send "a1 1139 1197"
# 3:0
l2g_send "a1 1169 1203"
l2g_send "a1 1201 1241"
l2g_send "a1 1246 1336"
l2g_send "a1 1300 1379"
l2g_send "a1 1334 1441"
l2g_send "a1 1371 1458"
l2g_send "a1 1420 1443"
l2g_send "a1 1475 1503"
l2g_send "a1 1534 1641"
l2g_send "a1 1571 1679"
# 4:0
l2g_send "a1 1609 1690"
l2g_send "a1 1663 1760"
l2g_send "a1 1718 1763"
# 4:3
l2g_send "a1 1755 1844"
l2g_send "i1"
simple_expect "66:107" "test 197"
simple_expect "109:158" "test 198"
simple_expect "153:215" "test 199"
simple_expect "180:240" "test 200"
simple_expect "233:301" "test 201"
simple_expect "278:361" "test 202"
simple_expect "330:398" "test 203"
simple_expect "353:455" "test 204"
simple_expect "411:434" "test 205"
simple_expect "448:538" "test 206"
simple_expect "503:582" "test 207"
simple_expect "514:580" "test 208"
simple_expect "542:620" "test 209"
simple_expect "570:658" "test 210"
simple_expect "610:677" "test 211"
simple_expect "659:765" "test 212"
simple_expect "713:769" "test 213"
simple_expect "740:808" "test 214"
simple_expect "799:878" "test 215"
simple_expect "813:908" "test 216"
simple_expect "837:927" "test 217"
simple_expect "876:899" "test 218"
simple_expect "905:1000" "test 219"
simple_expect "917:963" "test 220"
simple_expect "976:1046" "test 221"
simple_expect "994:1094" "test 222"
simple_expect "1019:1048" "test 223"
simple_expect "1052:1129" "test 224"
simple_expect "1106:1198" "test 225"
simple_expect "1139:1197" "test 226"
simple_expect "1169:1203" "test 227"
simple_expect "1201:1241" "test 228"
simple_expect "1246:1336" "test 229"
simple_expect "1300:1379" "test 230"
simple_expect "1334:1441" "test 231"
simple_expect "1371:1458" "test 232"
simple_expect "1420:1443" "test 233"
simple_expect "1475:1503" "test 234"
simple_expect "1534:1641" "test 235"
simple_expect "1571:1679" "test 236"
simple_expect "1609:1690" "test 237"
simple_expect "1663:1760" "test 238"
simple_expect "1718:1763" "test 239"
simple_expect "1755:1844" "test 240"
l2g_send "u1"
simple_expect "Number of blocks: 5" "test 241"
simple_expect "First unused: 1756" "test 242"
simple_expect "0: 10 0 66 \\(sparse\\) \\\[66:107 109:158 153:215 180:240 233:301 278:361 330:398 353:455 411:434 448:538 \\\]" "test 243"
simple_expect "1: 10 0 503 \\(sparse\\) \\\[503:582 514:580 542:620 570:658 610:677 659:765 713:769 740:808 799:878 813:908 \\\]" "test 244"
simple_expect "2: 10 0 837 \\(sparse\\) \\\[837:927 876:899 905:1000 917:963 976:1046 994:1094 1019:1048 1052:1129 1106:1198 1139:1197 \\\]" "test 245"
simple_expect "3: 10 0 1169 \\(sparse\\) \\\[1169:1203 1201:1241 1246:1336 1300:1379 1334:1441 1371:1458 1420:1443 1475:1503 1534:1641 1571:1679 \\\]" "test 246"
simple_expect "4: 4 6 1609 \\(sparse\\) \\\[1609:1690 1663:1760 1718:1763 1755:1844 \\\]" "test 247"
l2g_send "d1 66"
l2g_send "d1 503"
l2g_send "d1 976"
l2g_send "d1 1571"
l2g_send "d1 1755"
l2g_send "i1"
simple_expect "109:158" "test 248"
simple_expect "153:215" "test 249"
simple_expect "180:240" "test 250"
simple_expect "233:301" "test 251"
simple_expect "278:361" "test 252"
simple_expect "330:398" "test 253"
simple_expect "353:455" "test 254"
simple_expect "411:434" "test 255"
simple_expect "448:538" "test 256"
simple_expect "514:580" "test 257"
simple_expect "542:620" "test 258"
simple_expect "570:658" "test 259"
simple_expect "610:677" "test 260"
simple_expect "659:765" "test 261"
simple_expect "713:769" "test 262"
simple_expect "740:808" "test 263"
simple_expect "799:878" "test 264"
simple_expect "813:908" "test 265"
simple_expect "837:927" "test 266"
simple_expect "876:899" "test 267"
simple_expect "905:1000" "test 268"
simple_expect "917:963" "test 269"
simple_expect "994:1094" "test 270"
simple_expect "1019:1048" "test 271"
simple_expect "1052:1129" "test 272"
simple_expect "1106:1198" "test 273"
simple_expect "1139:1197" "test 273b"
simple_expect "1169:1203" "test 274"
simple_expect "1201:1241" "test 275"
simple_expect "1246:1336" "test 276"
simple_expect "1300:1379" "test 277"
simple_expect "1334:1441" "test 278"
simple_expect "1371:1458" "test 279"
simple_expect "1420:1443" "test 280"
simple_expect "1475:1503" "test 281"
simple_expect "1534:1641" "test 282"
simple_expect "1609:1690" "test 284"
simple_expect "1663:1760" "test 285"
simple_expect "1718:1763" "test 286"
l2g_send "u1"
simple_expect "Number of blocks: 5" "test 287"
simple_expect "First unused: 1756" "test 288"
simple_expect "0: 10 1 66 \\(sparse\\) \\\[66:0 109:158 153:215 180:240 233:301 278:361 330:398 353:455 411:434 448:538 \\\]" "test 289"
simple_expect "1: 10 1 503 \\(sparse\\) \\\[503:0 514:580 542:620 570:658 610:677 659:765 713:769 740:808 799:878 813:908 \\\]" "test 290"
simple_expect "2: 10 1 837 \\(sparse\\) \\\[837:927 876:899 905:1000 917:963 976:0 994:1094 1019:1048 1052:1129 1106:1198 1139:1197 \\\]" "test 291"
simple_expect "3: 10 1 1169 \\(sparse\\) \\\[1169:1203 1201:1241 1246:1336 1300:1379 1334:1441 1371:1458 1420:1443 1475:1503 1534:1641 1571:0 \\\]" "test 292"
simple_expect "4: 4 7 1609 \\(sparse\\) \\\[1609:1690 1663:1760 1718:1763 1755:0 \\\]" "test 293"
l2g_stop
# Test for an obscure bug that once existed in find_block_index_key,
# where it would find the correct value, but return the first key
# present in the sparse block even if it was a deleted one.
l2g_start
l2g_send "I0"
l2g_send "a0 100 999"
l2g_send "a0 400 9999"
l2g_send "d0 100"
l2g_send "n0 0"
simple_expect "400" "test 0"
l2g_stop
# Ensure that the copy operation actually copies all relevant state.
l2g_start
l2g_send "I0"
l2g_send "a0 10 1010"
l2g_send "a0 11 1011"
l2g_send "a0 12 1012"
l2g_send "a0 13 1013"
l2g_send "a0 14 1014"
l2g_send "a0 15 1015"
l2g_send "a0 16 1016"
l2g_send "a0 17 1017"
l2g_send "a0 18 1018"
l2g_send "a0 19 1019"
l2g_send "a0 25 1025"
l2g_send "a0 43 1043"
l2g_send "a0 98 1098"
l2g_send "I1"
l2g_send "C1 0"
l2g_send "u0"
simple_expect "Number of blocks: 2" "test 1"
simple_expect "First unused: 99" "test 2"
simple_expect "0: 10 0 10 \\(dense\\) \\\[1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 \\\]" "test 3"
simple_expect "1: 3 7 25 \\(sparse\\) \\\[25:1025 43:1043 98:1098 \\\]" "test 4"
l2g_send "u1"
simple_expect "Number of blocks: 2" "test 5"
simple_expect "First unused: 99" "test 6"
simple_expect "0: 10 0 10 \\(dense\\) \\\[1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 \\\]" "test 7"
simple_expect "1: 3 7 25 \\(sparse\\) \\\[25:1025 43:1043 98:1098 \\\]" "test 8"
l2g_send "d0 98"
l2g_send "I1"
l2g_send "C1 0"
l2g_send "u0"
simple_expect "Number of blocks: 2" "test 9"
simple_expect "First unused: 99" "test 10"
simple_expect "0: 10 0 10 \\(dense\\) \\\[1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 \\\]" "test 11"
simple_expect "1: 3 8 25 \\(sparse\\) \\\[25:1025 43:1043 98:0 \\\]" "test 12"
l2g_send "u1"
simple_expect "Number of blocks: 2" "test 13"
simple_expect "First unused: 99" "test 14"
simple_expect "0: 10 0 10 \\(dense\\) \\\[1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 \\\]" "test 15"
simple_expect "1: 2 8 25 \\(sparse\\) \\\[25:1025 43:1043 \\\]" "test 16"
l2g_send "w0"
simple_expect "\\\[ 99 10 1010 11 1011 12 1012 13 1013 14 1014 15 1015 16 1016 17 1017 18 1018 19 1019 25 1025 43 1043 \\\]" "test 17"
# FIXME: Build something where the last entry has been deleted,
l2g_send "w1"
simple_expect "\\\[ 99 10 1010 11 1011 12 1012 13 1013 14 1014 15 1015 16 1016 17 1017 18 1018 19 1019 25 1025 43 1043 \\\]" "test 18"
l2g_send "d0 25"
l2g_send "d0 43"
<