gdb/testsuite/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 6 Aug 2012 20:14:11 +0000 (20:14 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 6 Aug 2012 20:14:11 +0000 (20:14 +0000)
* gdb.base/list.exp (test_only_end): New function.
Call it.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/list.exp

index 3f2e49662b7e7f6c91e73f608a97757e4b010024..a85ea17afaada3b1c6dbf78cf63d7ee6ef0f9b54 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * gdb.base/list.exp (test_only_end): New function.
+       Call it.
+
 2012-08-06  Tom Tromey  <tromey@redhat.com>
 
        * gdb.python/py-mi.exp: Add test for printer whose children
index 16d25d25a19d88dc636e4de1cd4827da7ead092c..6b5b207d4b36dd1fd13cc8f5fdf74c12b3a2d4b4 100644 (file)
@@ -505,6 +505,12 @@ proc test_forward_search {} {
        verbose "Timeout is now $timeout seconds" 2
 }
 
+proc test_only_end {} {
+    gdb_test_no_output "set listsize 2"
+    gdb_test "list 1" "list 1\r\n1\[ \t\]\[^\r\n\]*\r\n2\[ \t\]\[^\r\n\]*"
+    gdb_test "list ,5" "list ,5\r\n4\[ \t\]\[^\r\n\]*\r\n5\[ \t\]\[^\r\n\]*"
+}
+
 # Start with a fresh gdb.
 
 gdb_exit
@@ -526,6 +532,7 @@ if [ set_listsize 10 ] then {
     test_list_range
     test_list_filename_and_function
     test_forward_search
+    test_only_end
 }
 
 remote_exec build "rm -f list0.h"