From ca98ebc4dd2fefd3bb3417e63d111adca6da5275 Mon Sep 17 00:00:00 2001 From: Vinay Ekambaram Date: Thu, 7 Jun 2018 15:59:58 -0400 Subject: [PATCH 1/2] New v63003/gtm8889 (tests GTM-8889 in V63003) --- 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..31ddbb7d9 --- /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 GTM prompt so we can run on previous versions (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" + From c2f49562603afdab14c25cdaef17ad2e931a20c4 Mon Sep 17 00:00:00 2001 From: Vinay Ekambaram Date: Fri, 8 Jun 2018 11:38:17 -0400 Subject: [PATCH 2/2] Fixed comment in v63003/gtm8787 --- v63003/u_inref/gtm8889.csh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v63003/u_inref/gtm8889.csh b/v63003/u_inref/gtm8889.csh index 31ddbb7d9..1a5fb0f02 100644 --- a/v63003/u_inref/gtm8889.csh +++ b/v63003/u_inref/gtm8889.csh @@ -18,7 +18,7 @@ echo "# Pressing Control C while in zhelp, would get an error in previous versio echo "" echo "# Terminal Display:" echo "" -# Setting GTM prompt so we can run on previous versions (which default to "GTM>" +# 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