Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New v63003/gtm8889 (tests GTM-8889 in V63003) #215

Merged
merged 2 commits into from
Jun 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion v63003/instream.csh
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@
# gtm8798 [vinay] Tests ENDIANCVT converts the mutex fields
# gtm8846 [vinay] Tests Mupip Set Journal appropriately handles a file with excess slashes
# gtm8780 [vinay] Tests $SELECT() produces a syntax error for an omitted colon after a literal true argument
# gtm8889 [vinay] Tests zhelp does not produce an error when <Ctrl C> is pressed
#-------------------------------------------------------------------------------------

echo "v63003 test starts..."

# List the subtests separated by spaces under the appropriate environment variable name
setenv subtest_list_common ""
setenv subtest_list_non_replic "gtm8788 gtm7986 gtm8186 gtm8804 gtm8832 gtm8617 gtm4212 gtm8732nr gtm8767 gtm8735 gtm8779 gtm8798"
setenv subtest_list_non_replic "$subtest_list_non_replic gtm8846 gtm8780"
setenv subtest_list_non_replic "$subtest_list_non_replic gtm8846 gtm8780 gtm8889"
setenv subtest_list_replic "gtm8732r"

if ($?test_replic == 1) then
Expand Down
36 changes: 36 additions & 0 deletions v63003/outref/gtm8889.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Pressing Control C while in zhelp, would get an error in previous versions

# Terminal Display:

spawn /usr/local/bin/tcsh -f
> # Expect the shell prompt
stty cols 132
> YDB
$ydb_dist/mumps -dir

YDB>zhelp



Additional information available:

About_YottaDB Commands Err_Processing Functions
Integrate_External Internationalization IO_Processing
ISV Language_Extensions M_Lang_Features Opr_Dbg_Dir_Mode
Program_Cycle Triggers Utility_Routines

Topic? #<Ctrl-C>




Additional information available:

About_YottaDB Commands Err_Processing Functions
Integrate_External Internationalization IO_Processing
ISV Language_Extensions M_Lang_Features Opr_Dbg_Dir_Mode
Program_Cycle Triggers Utility_Routines

Topic?

YDB>halt
1 change: 1 addition & 0 deletions v63003/outref/outref.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ PASS from gtm8779
PASS from gtm8798
PASS from gtm8846
PASS from gtm8780
PASS from gtm8889
##ALLOW_OUTPUT REPLIC
##SUSPEND_OUTPUT NON_REPLIC
PASS from gtm8732r
Expand Down
29 changes: 29 additions & 0 deletions v63003/u_inref/gtm8889.csh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/local/bin/tcsh -f
#################################################################
# #
# Copyright (c) 2018 YottaDB LLC. and/or its subsidiaries. #
# All rights reserved. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
#
#
#

echo "# Pressing Control C while in zhelp, would get an error in previous versions"
echo ""
echo "# Terminal Display:"
echo ""
# Setting prompt explicitly so we can run on previous GTM versions too (which default to "GTM>")
setenv gtm_prompt "YDB>"
(expect -d $gtm_tst/$tst/u_inref/gtm8889.exp > expect.outx) >& expect.dbg
if ($status) then
echo "EXPECT Failed"
endif
perl $gtm_tst/com/expectsanitize.pl expect.outx > expect_sanitized.outx

cat expect_sanitized.outx
46 changes: 46 additions & 0 deletions v63003/u_inref/gtm8889.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#################################################################
# #
# Copyright (c) 2018 YottaDB LLC. and/or its subsidiaries. #
# All rights reserved. #
# #
# This source code contains the intellectual property #
# of its copyright holder(s), and is made available #
# under a license. If you do not know the terms of #
# the license, please stop and do not read further. #
# #
#################################################################
#
set timeout 60

spawn /usr/local/bin/tcsh -f

expect_after {
timeout { timeout_procedure }
}

proc timeout_procedure { } {
puts "timeout occurred"
exit -1
}

expect -exact ">"
puts "# Expect the shell prompt"

# Have columns higher than 80 as that can cause test failures on lines that are just above 80 columns in length
send -- "stty cols 132\r"
expect "stty cols 132\r"

expect -exact ">"
puts "YDB"
send -- "\$ydb_dist/mumps -dir\r"
expect -exact "YDB>"
send "zhelp\r"
expect "Topic?"
puts "#<Ctrl-C>"
send "\x03\r"
send "\r"
expect -exact "YDB>"
send "halt\r"
expect ">"
send "exit\r"