From: Per Bothner Date: Tue, 5 Mar 1996 08:21:49 +0000 (+0000) Subject: * string.ch, string.exp: Add tests (from Cygnus PR chill/9078). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6cec39dc99803eabed456914852ed0cd79d1869a;p=binutils-gdb.git * string.ch, string.exp: Add tests (from Cygnus PR chill/9078). --- diff --git a/gdb/testsuite/gdb.chill/ChangeLog b/gdb/testsuite/gdb.chill/ChangeLog index 043f3feba38..7d5f943b14a 100644 --- a/gdb/testsuite/gdb.chill/ChangeLog +++ b/gdb/testsuite/gdb.chill/ChangeLog @@ -1,5 +1,7 @@ Tue Mar 5 00:09:17 1996 Per Bothner + * string.ch, string.exp: Add tests (from Cygnus PR chill/9078). + * pr-9095.ch, pr-9095.exp: New test case. Fri Feb 9 08:22:16 1996 Fred Fish diff --git a/gdb/testsuite/gdb.chill/string.ch b/gdb/testsuite/gdb.chill/string.ch index 3739c28d5c3..3503c462eae 100644 --- a/gdb/testsuite/gdb.chill/string.ch +++ b/gdb/testsuite/gdb.chill/string.ch @@ -1,4 +1,15 @@ -ss: MODULE /* This is Cynus PR chill/5696. */ +ss: MODULE + +/* These declarations are from Cygnus PR chill/9078. */ + SYNMODE m_char20 = CHARS(20) VARYING; + + DCL foo m_char20 INIT := "Moser "; + DCL bar m_char20 INIT := "Wilfried"; + + DCL foo1 CHARS(5) INIT := "12345"; + DCL bar1 CHARS(5) INIT := "abcde"; + +/* This is Cynus PR chill/5696. */ DCL s20 CHARS(20) VARYING; diff --git a/gdb/testsuite/gdb.chill/string.exp b/gdb/testsuite/gdb.chill/string.exp index 436f3bd1a90..54c88dabe80 100644 --- a/gdb/testsuite/gdb.chill/string.exp +++ b/gdb/testsuite/gdb.chill/string.exp @@ -47,7 +47,7 @@ proc do_tests {} { send "set language chill\n" ; expect -re "$prompt $" # These tests based on Cygnus PR chill/5696. - runto string.ch:11 + runto string.ch:22 gdb_test "p s20" { = "Moser Wilfried"} "print simple vstring" gdb_test "p s20(1)" { = 'o'} "print vstring element" gdb_test "p s20(1:3)" { = "ose"} "print vstring slice (:)" @@ -63,6 +63,11 @@ proc do_tests {} { gdb_test "p upper(s10)" { = 9} "print string upper" gdb_test "p lower(s20)" { = 0} "print varying string lower" gdb_test "p upper(s20)" { = 19} "print varying string upper" + + # These tests are based on Cygnus PR chill/9078. + gdb_test "print foo // bar" { = "Moser Wilfried"} + gdb_test "print foo // bar1" { = "Moser abcde"} + gdb_test "print foo1 // bar1" { = "12345abcde"} } do_tests