From 0071364cbf53729babb65b7e400e48732b259e92 Mon Sep 17 00:00:00 2001 From: VinayYottaDB <39492500+VinayYottaDB@users.noreply.github.com> Date: Fri, 8 Jun 2018 12:08:15 -0400 Subject: [PATCH] New v63003/gtm8889 subtest (tests GTM-8889 in V63003) Tests the following release note: The ZHELP command does not report errors after the user presses a . Previously, when exiting after a , the utility reported an UNDEF error and left a GT.M help dump file for analysis. (GTM-8889) --- v63003/instream.csh | 3 ++- v63003/outref/gtm8889.txt | 36 +++++++++++++++++++++++++++++ v63003/outref/outref.txt | 1 + v63003/u_inref/gtm8889.csh | 29 ++++++++++++++++++++++++ v63003/u_inref/gtm8889.exp | 46 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 v63003/outref/gtm8889.txt create mode 100644 v63003/u_inref/gtm8889.csh create mode 100644 v63003/u_inref/gtm8889.exp diff --git a/v63003/instream.csh b/v63003/instream.csh index 5dd054053..0792aeefc 100644 --- a/v63003/instream.csh +++ b/v63003/instream.csh @@ -29,6 +29,7 @@ # 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 is pressed #------------------------------------------------------------------------------------- echo "v63003 test starts..." @@ -36,7 +37,7 @@ 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 diff --git a/v63003/outref/gtm8889.txt b/v63003/outref/gtm8889.txt new file mode 100644 index 000000000..6d63b5c20 --- /dev/null +++ b/v63003/outref/gtm8889.txt @@ -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? # + + + + +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 diff --git a/v63003/outref/outref.txt b/v63003/outref/outref.txt index e8f8b1346..07d112f17 100644 --- a/v63003/outref/outref.txt +++ b/v63003/outref/outref.txt @@ -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 diff --git a/v63003/u_inref/gtm8889.csh b/v63003/u_inref/gtm8889.csh new file mode 100644 index 000000000..1a5fb0f02 --- /dev/null +++ b/v63003/u_inref/gtm8889.csh @@ -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 diff --git a/v63003/u_inref/gtm8889.exp b/v63003/u_inref/gtm8889.exp new file mode 100644 index 000000000..bddf07afb --- /dev/null +++ b/v63003/u_inref/gtm8889.exp @@ -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 "#" +send "\x03\r" +send "\r" +expect -exact "YDB>" +send "halt\r" +expect ">" +send "exit\r" +