From 6cec39dc99803eabed456914852ed0cd79d1869a Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Tue, 5 Mar 1996 08:21:49 +0000 Subject: [PATCH] * string.ch, string.exp: Add tests (from Cygnus PR chill/9078). --- gdb/testsuite/gdb.chill/ChangeLog | 2 ++ gdb/testsuite/gdb.chill/string.ch | 13 ++++++++++++- gdb/testsuite/gdb.chill/string.exp | 7 ++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.chill/ChangeLog b/gdb/testsuite/gdb.chill/ChangeLog index 043f3feba3..7d5f943b14 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 3739c28d5c..3503c462ea 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 436f3bd1a9..54c88dabe8 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