2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: Cscrolltitle.c /main/3 1995/10/31 11:49:44 rswiston $ */
30 #define SAVELOG fclose(TermLog); TermLog = fopen("term.log", "a");
36 void TestScrollbar(WinName, String, TestNum)
37 char *WinName, *String;
40 char Str[IMAGE_FILE_LEN];
41 PrintTermString(WinName, String);
42 sprintf(Str, "%sscrollbar%d", IMAGE_DIR, TestNum);
43 MatchWindows(WinName, Str);
47 static char *OptionArr[] = {
48 /*0*/ " -sb -title TITLE1",
49 /*1*/ " +sb -title title2",
50 /*2*/ " -xrm 'dtterm*scrollBar: False' -sb -title TITLE3",
51 /*3*/ " -xrm 'dtterm*scrollBar: True' +sb -title title4"
54 static char *LogAction[] = {
55 /*0*/ "Testing Option -sb ",
56 /*1*/ "Testing Option +sb ",
57 /*2*/ "Testing Option -xrm 'dtterm*scrollBar: False' -sb",
58 /*3*/ "Testing Option -xrm 'dtterm*scrollBar: True' +sb"
61 #define ArrCount (int) (sizeof(OptionArr) / sizeof(char *))
68 char Command[NEED_LEN];
72 if ((TermLog = fopen("term.log", "a")) == NULL) {
73 if ((TermLog = fopen("term.log", "w")) == NULL)
74 {printf("Logfile could not be opened \n"); exit(-1);}
76 LogError("****************************************************************************");
78 sprintf(Command, "TestName: <%s> STARTS\n", argv[0]);
82 for (i=0; i < ArrCount; i++) {
83 strcpy(Command, TERM_EMU);
84 strcat(Command, OptionArr[i]);
86 LogError(LogAction[i]);
88 if (WaitWinMap("TermWin") < 0) continue;
89 AssignWinName("TermWin", TERM_EMU);
90 TestScrollbar("TermWin", OptionArr[i], i+1);
91 WaitWinUnMap("TermWin", 60L);
95 sprintf(Command, "TestName: <%s> ENDS\n", argv[0]);
97 LogError("****************************************************************************");