* string.ch, string.exp: Add tests (from Cygnus PR chill/9078).

This commit is contained in:
Per Bothner 1996-03-05 08:21:49 +00:00
parent 8d67b75aa2
commit 6cec39dc99
3 changed files with 20 additions and 2 deletions

View File

@ -1,5 +1,7 @@
Tue Mar 5 00:09:17 1996 Per Bothner <bothner@kalessin.cygnus.com>
* 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 <fnf@cygnus.com>

View File

@ -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;

View File

@ -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