Initial import of the CDE 2.1.30 sources from the Open Group.
This commit is contained in:
52
cde/programs/dtterm/tests/scroll/Imakefile
Normal file
52
cde/programs/dtterm/tests/scroll/Imakefile
Normal file
@@ -0,0 +1,52 @@
|
||||
XCOMM $XConsortium: Imakefile /main/8 1996/10/09 14:10:29 drk $
|
||||
PROGRAMS = scroll
|
||||
|
||||
INCLUDES = -I. -I$(DTINCLUDESRC)
|
||||
LOCAL_INCLUDES = -I../shared -I$(TOP)/lib/
|
||||
SYS_LIBRARIES = -lm
|
||||
|
||||
|
||||
EXTRA_DEFINES = -DLOG -DSYNLIB
|
||||
|
||||
#if defined(ApolloArchitecture)
|
||||
EXTRA_DEFINES = -Dapollo -D_CMDINV
|
||||
#if defined(SHLIB)
|
||||
LOCAL_LIBRARIES = -A inlib,$(XLIB)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SunArchitecture)
|
||||
SYS_LIBRARIES = -lm -ldl -lgen -lC
|
||||
SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
|
||||
XTST=/usr/openwin/lib/libXtst.a
|
||||
#endif
|
||||
|
||||
#if defined(USLArchitecture)
|
||||
SYS_LIBRARIES = -lm -ldl -lgen
|
||||
#endif
|
||||
|
||||
#if defined(UXPArchitecture)
|
||||
SYS_LIBRARIES = -lm -ldl -lgen
|
||||
#endif
|
||||
|
||||
LOCAL_LIBRARIES = ../shared/libtermtest.a $(SYNLIB) $(XTST) $(XEXT) $(XLIB)
|
||||
|
||||
SRCS = scroll.c
|
||||
|
||||
OBJS = scroll.o
|
||||
|
||||
NormalLibraryObjectRule()
|
||||
ComplexProgramTarget($(PROGRAMS))
|
||||
|
||||
saber_src: $(SRCS)
|
||||
XCOMM setopt load_flags $(CFLAGS)
|
||||
XCOMM load $(SRCS) $(LOCAL_LIBRARIES)
|
||||
|
||||
unsaber_src:
|
||||
XCOMM unload $(SRCS)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
21
cde/programs/dtterm/tests/scroll/README
Normal file
21
cde/programs/dtterm/tests/scroll/README
Normal file
@@ -0,0 +1,21 @@
|
||||
/* $XConsortium: README /main/2 1996/07/15 14:28:22 drk $ */
|
||||
TestName: scroll
|
||||
|
||||
Description: This program tests the character attibutes functionality of dtterm.
|
||||
The following escape sequences are tested
|
||||
|
||||
"\033[?4h"
|
||||
"\033[?4l"
|
||||
"\033[?4s"
|
||||
"\033[?4r"
|
||||
|
||||
this has to be verified mannually
|
||||
|
||||
How to run: invoke dtterm and run the program with any of the following
|
||||
option
|
||||
|
||||
commandline: -o dtterm.object
|
||||
-o dtterm.object -r -save (for recording)
|
||||
-o dtterm.object -compare -save (for comparing)
|
||||
|
||||
|
||||
83
cde/programs/dtterm/tests/scroll/scroll.c
Normal file
83
cde/programs/dtterm/tests/scroll/scroll.c
Normal file
@@ -0,0 +1,83 @@
|
||||
/* $XConsortium: scroll.c /main/3 1995/10/31 11:58:41 rswiston $ */
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "synvar.h"
|
||||
#include "common.h"
|
||||
|
||||
#ifdef LOG
|
||||
FILE *TermLog;
|
||||
#define SAVELOG fclose(TermLog); TermLog = fopen("term.log", "a");
|
||||
#endif
|
||||
|
||||
char LogStr[200];
|
||||
|
||||
void TestScrolling(WinName)
|
||||
char *WinName;
|
||||
{
|
||||
|
||||
int i, NumLines, NumCols;
|
||||
char Str[200];
|
||||
|
||||
START(1,0,0,0,0);
|
||||
if (CheckTermStatus() == -1)
|
||||
{printf("terminal emulator malfunctioning\n"); DONE(); return;}
|
||||
GetWinSize(&NumLines, &NumCols);
|
||||
#ifdef DEBUG
|
||||
sprintf(LogStr, "WINDOW Size Cols: %d Lines: %d \n", NumCols, NumLines);
|
||||
LogError(LogStr);
|
||||
#endif
|
||||
ClearScreen();
|
||||
SetScrollType(DECModeSet);
|
||||
SetScrollType(DECModeSave);
|
||||
for (i=0; i < (20*NumLines); i++) {
|
||||
sprintf(Str, "%s%d", "It's in smooth Scroll Mode. is it right", i);
|
||||
WRITETEST(Str);
|
||||
NextLine();
|
||||
}
|
||||
ClearScreen();
|
||||
sleep(2);
|
||||
SetScrollType(DECModeReset);
|
||||
for (i=0; i < (20*NumLines); i++) {
|
||||
sprintf(Str, "%s%d", "It's in Jump Scroll Mode. is it right", i);
|
||||
WRITETEST(Str);
|
||||
NextLine();
|
||||
}
|
||||
SetScrollType(DECModeRestore);
|
||||
ClearScreen();
|
||||
sleep(2);
|
||||
for (i=0; i < (20*NumLines); i++) {
|
||||
sprintf(Str, "%s%d", "It's in smooth Scroll Mode. is it right", i);
|
||||
WRITETEST(Str);
|
||||
NextLine();
|
||||
}
|
||||
DONE();
|
||||
}
|
||||
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
|
||||
#ifdef LOG
|
||||
if ((TermLog = fopen("term.log", "a")) == NULL) {
|
||||
if ((TermLog = fopen("term.log", "w")) == NULL)
|
||||
{printf("Logfile could not be opened \n"); exit(-1);}
|
||||
}
|
||||
fprintf(TermLog, "**************************************************\n");
|
||||
LogTime();
|
||||
fprintf(TermLog, "TestName: <%s> STARTS\n", argv[0]);
|
||||
#endif
|
||||
#ifdef SYNLIB
|
||||
InitTest(argc, argv);
|
||||
AssignWinName("TermWin", TERM_EMU);
|
||||
#endif
|
||||
TestScrolling("TermWin");
|
||||
#ifdef SYNLIB
|
||||
CloseTest(False);
|
||||
#endif
|
||||
#ifdef LOG
|
||||
fprintf(TermLog, "TestName: <%s> ENDS\n", argv[0]);
|
||||
fclose(TermLog);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user