1 # Copyright 1992-2019 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 # This file was written by Fred Fish. (fnf@cygnus.com)
19 standard_testfile list0.c list1.c
21 # Need to download the header to the host.
22 gdb_remote_download host ${srcdir}/${subdir}/list0.h
24 if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile $srcfile2] \
29 # Create and source the file that provides information about the compiler
30 # used to compile the test case.
31 if [get_compiler_info] {
35 # The last line in the file.
36 set last_line [gdb_get_line_number "last line" "list0.c"]
38 # Regex matching the last line in the file.
39 set last_line_re "${last_line}\[ \t\]+} /\\* last line \\*/"
42 # Local utility proc just to set and verify listsize
43 # Return 1 if success, 0 if fail.
46 set set_listsize_count 0
48 proc set_listsize { arg } {
50 global set_listsize_count
52 incr set_listsize_count
53 if [gdb_test_no_output "set listsize $arg" "setting listsize to $arg #$set_listsize_count"] {
60 if [gdb_test "show listsize" "Number of source lines.* is ${arg}.*" "show listsize $arg #$set_listsize_count"] {
67 # Test display of listsize lines around a given line number.
70 proc test_listsize {} {
76 gdb_test "show listsize" "Number of source lines gdb will list by default is 10.*" "show default list size"
78 # Show the default lines
80 gdb_test "list" "(1\[ \t\]+#include \"list0.h\".*7\[ \t\]+x = 0;\r\n.*10\[ \t\]+foo .x\[+)\]+;)" "list default lines around main"
82 # Ensure we can limit printouts to one line
85 gdb_test "list 1" "1\[ \t\]+#include \"list0.h\"" "list line 1 with listsize 1"
86 gdb_test "list 2" "2\[ \t\]+" "list line 2 with listsize 1"
91 if [ set_listsize 2 ] {
92 gdb_test "list 1" "1\[ \t\]+#include \"list0.h\"\r\n2\[ \t\]+" "list line 1 with listsize 2"
93 gdb_test "list 2" "1\[ \t\]+#include \"list0.h\"\r\n2\[ \t\]+" "list line 2 with listsize 2"
94 gdb_test "list 3" "2\[ \t\]+\r\n3\[ \t\]+int main \[)(\]+" "list line 3 with listsize 2"
97 # Try small listsize > 1 that is an odd number
99 if [ set_listsize 3 ] {
100 gdb_test "list 1" "1\[ \t\]+#include \"list0.h\".*3\[ \t\]+int main \[)(\]+" "list line 1 with listsize 3"
101 gdb_test "list 2" "1\[ \t\]+#include \"list0.h\".*3\[ \t\]+int main \[)(\]+" "list line 2 with listsize 3"
102 gdb_test "list 3" "2\[ \t\]+\r\n3\[ \t\]+int main \[(\]+\[)\]+\r\n4\[ \t\]+\{" "list line 3 with listsize 3"
105 # Try small listsize > 2 that is an even number.
107 if [ set_listsize 4 ] then {
108 gdb_test "list 1" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 1 with listsize 4"
109 gdb_test "list 2" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 2 with listsize 4"
111 gdb_test "list 3" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 3 with listsize 4"
112 gdb_test "list 4" "2\[ \t\]+\r\n.*5\[ \t\]+int x;.*" "list line 4 with listsize 4"
115 # Try a size larger than the entire file.
117 if [ set_listsize 100 ] then {
118 gdb_test "list 1" "1\[ \t\]+#include \"list0.h\".*\r\n${last_line_re}" "list line 1 with listsize 100"
120 gdb_test "list 10" "1\[ \t\]+#include \"list0.h\".*\r\n${last_line_re}" "list line 10 with listsize 100"
123 # Try listsize of 0 which is special, and means unlimited.
126 gdb_test "list 1" "1\[ \t\]+#include .*\r\n${last_line_re}" "list line 1 with unlimited listsize"
130 # Test "list filename:number" for C include file
133 proc test_list_include_file {} {
136 setup_xfail_format "COFF"
137 gdb_test "list list0.h:1" "1\[ \t\]+/\[*\]+ An include file .*10\[ \t\]+bar \\(x\\+\\+\\);" "list line 1 in include file"
139 setup_xfail_format "COFF"
140 gdb_test "list list0.h:100" "Line number 95 out of range; .*list0.h has 3\[67\] lines." "list message for lines past EOF"
144 # Test "list filename:number" for C source file
147 proc test_list_filename_and_number {} {
152 send_gdb "list list0.c:1\n"
154 -re "1\[ \t\]+#include \"list0.h\".*10\[ \t\]+foo .x\[+)\]+;\r\n$gdb_prompt $" {
157 -re ".*$gdb_prompt $" { fail "list list0.c:1" ; gdb_suppress_tests }
158 timeout { fail "list list0.c:1 (timeout)" ; gdb_suppress_tests }
160 send_gdb "list list0.c:10\n"
162 -re "5\[ \t\]+int x;.*14\[ \t\]+foo .x\[+)\]+;\r\n$gdb_prompt $" {
165 -re ".*$gdb_prompt $" { fail "list list.c:10" ; gdb_suppress_tests }
166 timeout { fail "list list.c:10 (timeout)" ; gdb_suppress_tests }
168 send_gdb "list list1.c:1\n"
170 -re "1\[ \t\]+\#include.*4\[ \t\]+.*int oof\[ \t\]*\(.*\);\r\n.*$gdb_prompt $" {
173 -re ".*$gdb_prompt $" { fail "list list1.c:1" ; gdb_suppress_tests }
174 timeout { fail "list list1.c:1 (timeout)" ; gdb_suppress_tests }
176 send_gdb "list list1.c:12\n"
178 -re "12\[ \t\]+long_line \[(\]+.*\[)\]+;.*13\[ \t\]+\}\r\n.*$gdb_prompt $" {
181 -re ".*$gdb_prompt $" { fail "list list1.c:12" ; gdb_suppress_tests }
182 timeout { fail "list list1.c:12 (timeout)" ; gdb_suppress_tests }
184 pass "list filename:number ($testcnt tests)"
185 gdb_stop_suppressing_tests
189 # Test "list function" for C source file
192 proc test_list_function {} {
195 # gcc appears to generate incorrect debugging information for code
196 # in include files, which breaks this test.
197 # SunPRO cc is the second case below, it's also correct.
198 gdb_test "list main" "(5\[ \t\]+int x;.*8\[ \t\]+foo \[(\]+.*\[)\]+;|1\[ \t\]+#include .*7\[ \t\]+x = 0;)" "list function in source file 1"
200 # Ultrix gdb takes the second case below; it's also correct.
201 # SunPRO cc is the third case.
202 gdb_test "list bar" "(4\[ \t\]+void.*\[ \t\]*long_line.*;.*bar.*9\[ \t\]*.*|1\[ \t\]+void.*8\[ \t\]+\}|1\[ \t\]+void.*7\[ \t\]*long_line ..;|7\[ \t\]+void.*14\[ \t\]+\})" "list function in source file 2"
204 # Test "list function" for C include file
205 # Ultrix gdb is the second case, still correct.
206 # SunPRO cc is the third case.
207 gdb_test "list foo" "(3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;|2\[ \t\]+including file.*11\[ \t\]+bar \[(\]+.*\[)\]+;|1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;)" "list function in include file"
210 proc test_list_forward {} {
216 send_gdb "list list0.c:10\n"
218 -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
219 -re ".*$gdb_prompt $" { fail "list list0.c:10" ; gdb_suppress_tests }
220 timeout { fail "list list0.c:10 (timeout)" ; gdb_suppress_tests }
225 -re "15\[ \t\]+foo \[(\]+.*\[)\]+;.*24\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
226 -re ".*$gdb_prompt $" { fail "list 15-24" ; gdb_suppress_tests }
227 timeout { fail "list 15-24 (timeout)" ; gdb_suppress_tests }
232 -re "25\[ \t\]+foo \[(\]+.*\[)\]+;.*34\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
233 -re ".*$gdb_prompt $" { fail "list 25-34" ; gdb_suppress_tests }
234 timeout { fail "list 25-34 (timeout)" ; gdb_suppress_tests }
239 -re "35\[ \t\]+foo \\(.*\\);.*${last_line_re}\r\n$gdb_prompt $" { incr testcnt }
240 -re ".*$gdb_prompt $" { fail "list 35-42" ; gdb_suppress_tests }
241 timeout { fail "list 35-42 (timeout)" ; gdb_suppress_tests }
244 pass "successive list commands to page forward ($testcnt tests)"
246 gdb_test "list" "Line number 44 out of range; \[^\r\n\]+ has 43 lines\." \
247 "end of file error after \"list\" command"
249 gdb_stop_suppressing_tests
252 # Test that repeating the list linenum command doesn't print the same
253 # lines over again. Note that this test makes sure that the argument
254 # linenum is dropped, when we repeat the previous command. 'x/5i $pc'
255 # works the same way.
257 proc test_repeat_list_command {} {
263 send_gdb "list list0.c:10\n"
265 -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
266 -re ".*$gdb_prompt $" { fail "list list0.c:10" ; gdb_suppress_tests }
267 timeout { fail "list list0.c:10 (timeout)" ; gdb_suppress_tests }
272 -re "15\[ \t\]+foo \[(\]+.*\[)\]+;.*24\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
273 -re ".*$gdb_prompt $" { fail "list 15-24" ; gdb_suppress_tests }
274 timeout { fail "list 15-24 (timeout)" ; gdb_suppress_tests }
279 -re "25\[ \t\]+foo \[(\]+.*\[)\]+;.*34\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
280 -re ".*$gdb_prompt $" { fail "list 25-34" ; gdb_suppress_tests }
281 timeout { fail "list 25-34 (timeout)" ; gdb_suppress_tests }
286 -re "35\[ \t\]+foo \\(.*\\);.*${last_line_re}\r\n$gdb_prompt $" { incr testcnt }
287 -re ".*$gdb_prompt $" { fail "list 35-42" ; gdb_suppress_tests }
288 timeout { fail "list 35-42 (timeout)" ; gdb_suppress_tests }
291 pass "repeat list commands to page forward using 'return' ($testcnt tests)"
293 gdb_test "list" "Line number 44 out of range; \[^\r\n\]+ has 43 lines\." \
294 "end of file error after using 'return' to repeat the list command"
296 gdb_stop_suppressing_tests
299 proc test_list_backwards {} {
304 send_gdb "list list0.c:33\n"
306 -re "28\[ \t\]+foo \\(.*\\);.*37\[ \t\]+\}\r\n$gdb_prompt $" { incr testcnt }
307 -re ".*$gdb_prompt $" { fail "list list0.c:33" ; gdb_suppress_tests }
308 timeout { fail "list list0.c:33 (timeout)" ; gdb_suppress_tests }
313 -re "18\[ \t\]+foo \[(\]+.*\[)\]+;.*27\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
314 -re ".*$gdb_prompt $" { fail "list 18-27" ; gdb_suppress_tests }
315 timeout { fail "list 18-27 (timeout)" ; gdb_suppress_tests }
320 -re "8\[ \t\]+foo \[(\]+.*\[)\]+;.*17\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" { incr testcnt }
321 -re ".*$gdb_prompt $" { fail "list 8-17" ; gdb_suppress_tests }
322 timeout { fail "list 8-17 (timeout)" ; gdb_suppress_tests }
327 -re "1\[ \t\]+#include .*7\[ \t\]+x = 0;\r\n$gdb_prompt $" { incr testcnt }
328 -re ".*$gdb_prompt $" { fail "list 1-7" ; gdb_suppress_tests }
329 timeout { fail "list 1-7 (timeout)" ; gdb_suppress_tests }
332 pass "$testcnt successive \"list -\" commands to page backwards"
334 gdb_test "list -" "Already at the start of .*\." \
335 "beginning of file error after \"list -\" command"
337 gdb_stop_suppressing_tests
341 # Test "list first,last"
344 proc test_list_range {} {
349 gdb_test "list list0.c:2,list0.c:5" "2\[ \t\]+\r\n3\[ \t\]+int main \[)(\]+.*5\[ \t\]+int x;" "list range; filename:line1,filename:line2"
351 gdb_test "list 2,5" "2\[ \t\]+\r\n3\[ \t\]+int main \[)(\]+.*5\[ \t\]+int x;" "list range; line1,line2"
353 # gdb_test "list -1,6" "Line number 0 out of range; .*list0.c has 39 lines." "list range; lower bound negative"
355 # gdb_test "list -100,-40" "Line number -60 out of range; .*list0.c has 39 lines." "list range; both bounds negative"
357 set past_end [expr ${last_line} + 10]
358 set much_past_end [expr ${past_end} + 10]
360 gdb_test "list 30,${past_end}" "30\[ \t\]+foo \(.*\);.*${last_line_re}" "list range; upper bound past EOF"
362 gdb_test "list ${past_end},${much_past_end}" "Line number ${past_end} out of range; .*list0.c has ${last_line} lines." "list range; both bounds past EOF"
364 gdb_test "list list0.c:2,list1.c:17" "Specified first and last lines are in different files." "list range, must be same files"
368 # Test "list filename:function"
371 proc test_list_filename_and_function {} {
377 # gcc appears to generate incorrect debugging information for code
378 # in include files, which breaks this test.
379 # SunPRO cc is the second case below, it's also correct.
380 send_gdb "list list0.c:main\n"
382 -re "1\[ \t\]+#include .*10\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" {
385 -re "5\[ \t\]+int x;.*14\[ \t\]+foo \[(\]+.*\[)\]+;\r\n$gdb_prompt $" {
386 pass "list function in source file 1"
388 -re ".*$gdb_prompt $" { fail "list list0.c:main" }
389 timeout { fail "list list0.c:main (timeout)" }
392 # Not sure what the point of having this function be unused is.
393 # AIX is legitimately removing it.
394 setup_xfail "rs6000-*-aix*"
395 send_gdb "list list0.c:unused\n"
397 -re "40\[ \t\]+unused.*${last_line_re}\r\n$gdb_prompt $" {
400 -re "37.*42\[ \t\]+\}\r\n$gdb_prompt $" {
403 -re ".*$gdb_prompt $" { fail "list list0.c:unused" }
404 timeout { fail "list list0.c:unused (timeout)" }
406 clear_xfail "rs6000-*-aix*"
408 # gcc appears to generate incorrect debugging information for code
409 # in include files, which breaks this test.
410 # Ultrix gdb is the second case, one line different but still correct.
411 # SunPRO cc is the third case.
412 setup_xfail "rs6000-*-*" 1804
413 setup_xfail_format "COFF"
414 send_gdb "list list0.h:foo\n"
416 -re "2\[ \t\]+including file. This.*11\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$gdb_prompt $" {
419 -re "1\[ \t\]+/. An include file.*10\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$gdb_prompt $" {
422 -re "3\[ \t\]+.*12\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$gdb_prompt $" {
425 -re "No source file named list0.h.\r\n$gdb_prompt $" {
426 fail "list list0.h:foo"
428 -re ".*$gdb_prompt $" { fail "list list0.h:foo" }
429 timeout { fail "list list0.h:foo (timeout)" }
432 # Ultrix gdb is the second case.
433 send_gdb "list list1.c:bar\n"
435 -re "4\[ \t\]+void.*13\[ \t\]+\}\r\n$gdb_prompt $" {
438 -re "4\[ \t\]+void.*12\[ \t\]*long_line ..;\r\n$gdb_prompt $" {
441 -re "4\[ \t\]+void.*11\[ \t\]*\r\n$gdb_prompt $" {
444 -re ".*$gdb_prompt $" { fail "list list1.c:bar" }
445 timeout { fail "list list1.c:bar (timeout)" }
448 # Not sure what the point of having this function be unused is.
449 # AIX is legitimately removing it.
450 setup_xfail "rs6000-*-aix*"
451 send_gdb "list list1.c:unused\n"
453 -re "12\[ \t\]+long_line \[(\]\[)\];.*13\[ \t\]+\}\r\n.*$gdb_prompt $" {
456 -re "14.*19\[ \t\]+\}\r\n.*$gdb_prompt $" {
459 -re ".*$gdb_prompt $" { fail "list list1.c:unused" }
460 timeout { fail "list list1.c:unused (timeout)" }
462 clear_xfail "rs6000-*-aix*"
464 pass "list filename:function ($testcnt tests)"
467 gdb_test "list 'list0.c:main'" "int main.*"
469 # Test some invalid specs
470 # The following test takes the FIXME result on most systems using
471 # DWARF. It fails to notice that main() is not in the file requested.
475 # Does this actually work ANYWHERE? I believe not, as this is an `aspect' of
476 # lookup_symbol(), where, when it is given a specific symtab which does not
477 # contain the requested symbol, it will subsequently search all of the symtabs
478 # for the requested symbol.
480 gdb_test "list list0.c:foo" "Function \"foo\" not defined in .*list0.c" "list filename:function; wrong filename rejected"
482 gdb_test "list foobar.c:main" "No source file named foobar.c.|Location not found" "list filename:function; nonexistant file"
484 gdb_test "list list0.h:foobar" "Function \"foobar\" not defined in \"list0.h\"." "list filename:function; nonexistant function"
488 # Test the forward-search (aka search) and the reverse-search commands.
490 proc test_forward_reverse_search {} {
493 gdb_test_no_output "set listsize 4"
494 # On SunOS4, this gives us lines 19-22. On AIX, it gives us
495 # lines 20-23. This depends on whether the line number of a function
496 # is considered to be the openbrace or the first statement--either one
498 gdb_test "list long_line" "24\[ \t\]+long_line .*"
500 gdb_test "search 4321" " not found"
502 gdb_test "search 6789" "28\[ \t\]+oof .6789.;"
504 # Try again, we shouldn't re-find the same source line. Also,
505 # while at it, test using the "forward-search" alias.
506 gdb_test "forward-search 6789" " not found"
508 # Now test backwards. First make sure we start searching from
509 # the previous line, not the current line.
510 gdb_test "reverse-search 6789" " not found"
512 # Now find something in a previous line.
513 gdb_test "reverse-search 67" "26\[ \t\]+oof .67.;"
515 # Test that GDB won't crash if the line being searched is extremely long.
517 set oldtimeout $timeout
518 set timeout [expr "$timeout + 300"]
519 verbose "Timeout is now $timeout seconds" 2
520 gdb_test "search 1234" ".*1234.*" "search extremely long line (> 5000 chars)"
521 set timeout $oldtimeout
522 verbose "Timeout is now $timeout seconds" 2
525 proc test_only_end {} {
526 gdb_test_no_output "set listsize 2"
527 gdb_test "list 1" "list 1\r\n1\[ \t\]\[^\r\n\]*\r\n2\[ \t\]\[^\r\n\]*"
528 gdb_test "list ,5" "list ,5\r\n4\[ \t\]\[^\r\n\]*\r\n5\[ \t\]\[^\r\n\]*"
531 proc test_list_invalid_args {} {
534 clean_restart ${binfile}
535 gdb_test "list -INVALID" \
536 "invalid explicit location argument, \"-INVALID\"" \
537 "first use of \"list -INVALID\""
538 gdb_test "list -INVALID" \
539 "invalid explicit location argument, \"-INVALID\"" \
540 "second use of \"list -INVALID\""
542 clean_restart ${binfile}
543 gdb_test "list +INVALID" "Function \"\\+INVALID\" not defined." \
544 "first use of \"list +INVALID\""
545 gdb_test "list +INVALID" "Function \"\\+INVALID\" not defined." \
546 "second use of \"list +INVALID\""
549 # Start with a fresh gdb.
553 gdb_reinitialize_dir $srcdir/$subdir
554 gdb_file_cmd ${binfile}
556 gdb_test_no_output "set width 0"
560 if [ set_listsize 10 ] then {
561 test_list_include_file
562 test_list_filename_and_number
566 test_repeat_list_command
568 test_list_filename_and_function
569 test_forward_reverse_search
571 test_list_invalid_args
574 # Follows tests that require execution.
576 # Build source listing pattern based on a line range spec string. The
577 # range can be specificed as "START-END" indicating all lines in range
578 # (inclusive); or just "LINE", indicating just that line.
580 proc build_pattern { range_spec } {
583 set range_list [split $range_spec -]
584 set range_list_len [llength $range_list]
586 set range_start [lindex $range_list 0]
587 if { $range_list_len > 2 || $range_list_len < 1} {
588 error "invalid range spec string: $range_spec"
589 } elseif { $range_list_len == 2 } {
590 set range_end [lindex $range_list 1]
592 set range_end $range_start
595 for {set i $range_start} {$i <= $range_end} {incr i} {
596 append pattern "\r\n$i\[ \t\]\[^\r\n\]*"
599 verbose -log "pattern $pattern"
603 # Test "list" command invocations right after stopping for an event.
604 # COMMAND is the actual list command, including arguments. LISTSIZE1
605 # and LISTSIZE2 are the listsizes set just before and after running
606 # the program to the stop point. COMMAND is issued twice. The first
607 # time, the lines specificed by LINERANGE1 are expected; the second
608 # time, the lines specified by LINERANGE2 are expected.
610 proc test_list {command listsize1 listsize2 linerange1 linerange2} {
611 with_test_prefix "$command after stop: $listsize1, $listsize2" {
614 clean_restart $binfile
615 if ![runto_main] then {
616 fail "can't run to main"
620 # Test changing the listsize both before nexting, and after
621 # stopping, but before listing. Only the second listsize
622 # change should affect which lines are listed.
623 with_test_prefix "before next" {
624 gdb_test_no_output "set listsize $listsize1"
626 gdb_test "next" "foo \\(.*"
627 with_test_prefix "after next" {
628 gdb_test_no_output "set listsize $listsize2"
631 set pattern1 [build_pattern $linerange1]
632 set pattern2 [build_pattern $linerange2]
633 gdb_test "$command" "${pattern1}" "$command #1"
634 gdb_test "$command" "${pattern2}" "$command #2"
639 # The first "list" should center the listing around line 8, the stop
641 test_list "list" 1 10 "3-12" "13-22"
644 test_list "list" 10 10 "3-12" "13-22"
646 # Likewise, but show only one line. IOW, the first list should show
647 # line 8. Note how the listsize is 10 at the time of the stop, but
648 # before any listing had been requested. That should not affect the
649 # line range that is first listed.
650 test_list "list" 10 1 "8" "9"
652 # Likewise, but show two lines.
653 test_list "list" 10 2 "7-8" "9-10"
656 test_list "list" 10 3 "7-9" "10-12"
658 # Now test backwards. Just like "list", the first "list -" should
659 # center the listing around the stop line.
660 test_list "list -" 10 10 "3-12" "2"
662 # Likewise, but test showing 3 lines at a time.
663 test_list "list -" 10 3 "7-9" "4-6"
666 test_list "list -" 10 2 "7-8" "5-6"
668 # Test listing one line only. This case is a little special and
669 # starts showing the previous line immediately instead of repeating
671 test_list "list -" 10 1 "7" "6"
673 remote_exec build "rm -f list0.h"