Added unit test for FTermDetection with a terminal simulation
This commit is contained in:
parent
0a5d5aa59c
commit
fc62f9cfe1
|
@ -1,3 +1,8 @@
|
||||||
|
2018-09-14 Markus Gans <guru.mail@muenster.de>
|
||||||
|
* Added unit test for FTermDetection with a terminal simulation
|
||||||
|
for common terminals
|
||||||
|
* Some minor terminal detection bug fixes
|
||||||
|
|
||||||
2018-09-12 Markus Gans <guru.mail@muenster.de>
|
2018-09-12 Markus Gans <guru.mail@muenster.de>
|
||||||
* Removes the deprecated keyword "register"
|
* Removes the deprecated keyword "register"
|
||||||
from the source code
|
from the source code
|
||||||
|
|
|
@ -61,8 +61,8 @@ class FTermDetection
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
// byte #0
|
// byte #0
|
||||||
uInt8 xterm : 1;
|
|
||||||
uInt8 ansi : 1;
|
uInt8 ansi : 1;
|
||||||
|
uInt8 xterm : 1;
|
||||||
uInt8 rxvt : 1;
|
uInt8 rxvt : 1;
|
||||||
uInt8 urxvt : 1;
|
uInt8 urxvt : 1;
|
||||||
uInt8 mlterm : 1;
|
uInt8 mlterm : 1;
|
||||||
|
@ -107,8 +107,8 @@ class FTermDetection
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
static bool isXTerminal();
|
|
||||||
static bool isAnsiTerminal();
|
static bool isAnsiTerminal();
|
||||||
|
static bool isXTerminal();
|
||||||
static bool isRxvtTerminal();
|
static bool isRxvtTerminal();
|
||||||
static bool isUrxvtTerminal();
|
static bool isUrxvtTerminal();
|
||||||
static bool isMltermTerminal();
|
static bool isMltermTerminal();
|
||||||
|
@ -117,13 +117,13 @@ class FTermDetection
|
||||||
static bool isGnomeTerminal();
|
static bool isGnomeTerminal();
|
||||||
static bool isKtermTerminal();
|
static bool isKtermTerminal();
|
||||||
static bool isTeraTerm();
|
static bool isTeraTerm();
|
||||||
static bool isSunTerminal();
|
|
||||||
static bool isCygwinTerminal();
|
static bool isCygwinTerminal();
|
||||||
static bool isMinttyTerm();
|
static bool isMinttyTerm();
|
||||||
static bool isLinuxTerm();
|
static bool isLinuxTerm();
|
||||||
static bool isFreeBSDTerm();
|
static bool isFreeBSDTerm();
|
||||||
static bool isNetBSDTerm();
|
static bool isNetBSDTerm();
|
||||||
static bool isOpenBSDTerm();
|
static bool isOpenBSDTerm();
|
||||||
|
static bool isSunTerminal();
|
||||||
static bool isScreenTerm();
|
static bool isScreenTerm();
|
||||||
static bool isTmuxTerm();
|
static bool isTmuxTerm();
|
||||||
static bool canDisplay256Colors();
|
static bool canDisplay256Colors();
|
||||||
|
@ -131,8 +131,8 @@ class FTermDetection
|
||||||
static bool hasSetCursorStyleSupport();
|
static bool hasSetCursorStyleSupport();
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
static void setXTerminal (bool);
|
|
||||||
static void setAnsiTerminal (bool);
|
static void setAnsiTerminal (bool);
|
||||||
|
static void setXTerminal (bool);
|
||||||
static void setRxvtTerminal (bool);
|
static void setRxvtTerminal (bool);
|
||||||
static void setUrxvtTerminal (bool);
|
static void setUrxvtTerminal (bool);
|
||||||
static void setMltermTerminal (bool);
|
static void setMltermTerminal (bool);
|
||||||
|
@ -141,13 +141,13 @@ class FTermDetection
|
||||||
static void setGnomeTerminal (bool);
|
static void setGnomeTerminal (bool);
|
||||||
static void setKtermTerminal (bool);
|
static void setKtermTerminal (bool);
|
||||||
static void setTeraTerm (bool);
|
static void setTeraTerm (bool);
|
||||||
static void setSunTerminal (bool);
|
|
||||||
static void setCygwinTerminal (bool);
|
static void setCygwinTerminal (bool);
|
||||||
static void setMinttyTerm (bool);
|
static void setMinttyTerm (bool);
|
||||||
static void setLinuxTerm (bool);
|
static void setLinuxTerm (bool);
|
||||||
static void setFreeBSDTerm (bool);
|
static void setFreeBSDTerm (bool);
|
||||||
static void setNetBSDTerm (bool);
|
static void setNetBSDTerm (bool);
|
||||||
static void setOpenBSDTerm (bool);
|
static void setOpenBSDTerm (bool);
|
||||||
|
static void setSunTerminal (bool);
|
||||||
static void setScreenTerm (bool);
|
static void setScreenTerm (bool);
|
||||||
static void setTmuxTerm (bool);
|
static void setTmuxTerm (bool);
|
||||||
static void setTerminalDetection (bool);
|
static void setTerminalDetection (bool);
|
||||||
|
@ -190,6 +190,7 @@ class FTermDetection
|
||||||
static char* secDA_Analysis_77 (char[]);
|
static char* secDA_Analysis_77 (char[]);
|
||||||
static char* secDA_Analysis_82 (char[]);
|
static char* secDA_Analysis_82 (char[]);
|
||||||
static char* secDA_Analysis_83 (char[]);
|
static char* secDA_Analysis_83 (char[]);
|
||||||
|
static char* secDA_Analysis_84 (char[]);
|
||||||
static char* secDA_Analysis_85 (char[]);
|
static char* secDA_Analysis_85 (char[]);
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
|
@ -330,10 +331,6 @@ inline bool FTermDetection::isKtermTerminal()
|
||||||
inline bool FTermDetection::isTeraTerm()
|
inline bool FTermDetection::isTeraTerm()
|
||||||
{ return terminal_type.tera_term; }
|
{ return terminal_type.tera_term; }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
inline bool FTermDetection::isSunTerminal()
|
|
||||||
{ return terminal_type.sun_con; }
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline bool FTermDetection::isCygwinTerminal()
|
inline bool FTermDetection::isCygwinTerminal()
|
||||||
{ return terminal_type.cygwin; }
|
{ return terminal_type.cygwin; }
|
||||||
|
@ -358,6 +355,10 @@ inline bool FTermDetection::isNetBSDTerm()
|
||||||
inline bool FTermDetection::isOpenBSDTerm()
|
inline bool FTermDetection::isOpenBSDTerm()
|
||||||
{ return terminal_type.openbsd_con; }
|
{ return terminal_type.openbsd_con; }
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
inline bool FTermDetection::isSunTerminal()
|
||||||
|
{ return terminal_type.sun_con; }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline bool FTermDetection::isScreenTerm()
|
inline bool FTermDetection::isScreenTerm()
|
||||||
{ return terminal_type.screen; }
|
{ return terminal_type.screen; }
|
||||||
|
@ -410,10 +411,6 @@ inline void FTermDetection::setKtermTerminal (bool on)
|
||||||
inline void FTermDetection::setTeraTerm (bool on)
|
inline void FTermDetection::setTeraTerm (bool on)
|
||||||
{ terminal_type.tera_term = on; }
|
{ terminal_type.tera_term = on; }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
inline void FTermDetection::setSunTerminal (bool on)
|
|
||||||
{ terminal_type.sun_con = on; }
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline void FTermDetection::setCygwinTerminal (bool on)
|
inline void FTermDetection::setCygwinTerminal (bool on)
|
||||||
{ terminal_type.cygwin = on; }
|
{ terminal_type.cygwin = on; }
|
||||||
|
@ -438,6 +435,10 @@ inline void FTermDetection::setNetBSDTerm (bool on)
|
||||||
inline void FTermDetection::setOpenBSDTerm (bool on)
|
inline void FTermDetection::setOpenBSDTerm (bool on)
|
||||||
{ terminal_type.openbsd_con = on; }
|
{ terminal_type.openbsd_con = on; }
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
inline void FTermDetection::setSunTerminal (bool on)
|
||||||
|
{ terminal_type.sun_con = on; }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline void FTermDetection::setScreenTerm (bool on)
|
inline void FTermDetection::setScreenTerm (bool on)
|
||||||
{ terminal_type.screen = on; }
|
{ terminal_type.screen = on; }
|
||||||
|
|
|
@ -62,6 +62,7 @@ class FTermios
|
||||||
static termios getTTY();
|
static termios getTTY();
|
||||||
static int getStdIn();
|
static int getStdIn();
|
||||||
static int getStdOut();
|
static int getStdOut();
|
||||||
|
static int getStdErr();
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
static bool isRaw();
|
static bool isRaw();
|
||||||
|
@ -85,6 +86,7 @@ class FTermios
|
||||||
// Data Members
|
// Data Members
|
||||||
static int stdin_no;
|
static int stdin_no;
|
||||||
static int stdout_no;
|
static int stdout_no;
|
||||||
|
static int stderr_no;
|
||||||
static bool raw_mode;
|
static bool raw_mode;
|
||||||
static struct termios term_init;
|
static struct termios term_init;
|
||||||
};
|
};
|
||||||
|
@ -103,6 +105,10 @@ inline int FTermios::getStdIn()
|
||||||
inline int FTermios::getStdOut()
|
inline int FTermios::getStdOut()
|
||||||
{ return stdout_no; }
|
{ return stdout_no; }
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
inline int FTermios::getStdErr()
|
||||||
|
{ return stderr_no; }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline bool FTermios::isRaw()
|
inline bool FTermios::isRaw()
|
||||||
{ return raw_mode; }
|
{ return raw_mode; }
|
||||||
|
|
|
@ -580,10 +580,7 @@ void FTerm::resetColorMap()
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
else
|
else
|
||||||
{
|
linux->resetColorMap();
|
||||||
linux->resetColorMap();
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( op )
|
if ( op )
|
||||||
|
@ -1692,6 +1689,7 @@ void FTerm::redefineColorPalette()
|
||||||
if ( isCygwinTerminal()
|
if ( isCygwinTerminal()
|
||||||
|| isKdeTerminal()
|
|| isKdeTerminal()
|
||||||
|| isTeraTerm()
|
|| isTeraTerm()
|
||||||
|
|| isMltermTerminal()
|
||||||
|| isNetBSDTerm()
|
|| isNetBSDTerm()
|
||||||
|| isOpenBSDTerm()
|
|| isOpenBSDTerm()
|
||||||
|| isSunTerminal()
|
|| isSunTerminal()
|
||||||
|
@ -1713,6 +1711,7 @@ void FTerm::restoreColorPalette()
|
||||||
if ( isCygwinTerminal()
|
if ( isCygwinTerminal()
|
||||||
|| isKdeTerminal()
|
|| isKdeTerminal()
|
||||||
|| isTeraTerm()
|
|| isTeraTerm()
|
||||||
|
|| isMltermTerminal()
|
||||||
|| isNetBSDTerm()
|
|| isNetBSDTerm()
|
||||||
|| isOpenBSDTerm()
|
|| isOpenBSDTerm()
|
||||||
|| isSunTerminal()
|
|| isSunTerminal()
|
||||||
|
|
|
@ -257,6 +257,20 @@ void FTermDetection::termtypeAnalysis()
|
||||||
terminal_type.kterm = true;
|
terminal_type.kterm = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// mlterm
|
||||||
|
if ( std::strncmp(termtype, "mlterm", 6) == 0 )
|
||||||
|
terminal_type.mlterm = true;
|
||||||
|
|
||||||
|
// screen/tmux
|
||||||
|
if ( std::strncmp(termtype, "screen", 6) == 0 )
|
||||||
|
{
|
||||||
|
terminal_type.screen = true;
|
||||||
|
char* tmux = std::getenv("TMUX");
|
||||||
|
|
||||||
|
if ( tmux && std::strlen(tmux) != 0 )
|
||||||
|
terminal_type.tmux = true;
|
||||||
|
}
|
||||||
|
|
||||||
// Linux console
|
// Linux console
|
||||||
if ( std::strncmp(termtype, C_STR("linux"), 5) == 0
|
if ( std::strncmp(termtype, C_STR("linux"), 5) == 0
|
||||||
|| std::strncmp(termtype, C_STR("con"), 3) == 0 )
|
|| std::strncmp(termtype, C_STR("con"), 3) == 0 )
|
||||||
|
@ -387,23 +401,13 @@ char* FTermDetection::termtype_256color_quirks()
|
||||||
new_termtype = C_STR("xterm-256color");
|
new_termtype = C_STR("xterm-256color");
|
||||||
|
|
||||||
if ( std::strncmp(termtype, "screen", 6) == 0 )
|
if ( std::strncmp(termtype, "screen", 6) == 0 )
|
||||||
{
|
|
||||||
new_termtype = C_STR("screen-256color");
|
new_termtype = C_STR("screen-256color");
|
||||||
terminal_type.screen = true;
|
|
||||||
char* tmux = std::getenv("TMUX");
|
|
||||||
|
|
||||||
if ( tmux && std::strlen(tmux) != 0 )
|
|
||||||
terminal_type.tmux = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( std::strncmp(termtype, "Eterm", 5) == 0 )
|
if ( std::strncmp(termtype, "Eterm", 5) == 0 )
|
||||||
new_termtype = C_STR("Eterm-256color");
|
new_termtype = C_STR("Eterm-256color");
|
||||||
|
|
||||||
if ( std::strncmp(termtype, "mlterm", 6) == 0 )
|
if ( std::strncmp(termtype, "mlterm", 6) == 0 )
|
||||||
{
|
|
||||||
new_termtype = C_STR("mlterm-256color");
|
new_termtype = C_STR("mlterm-256color");
|
||||||
terminal_type.mlterm = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( std::strncmp(termtype, "rxvt", 4) != 0
|
if ( std::strncmp(termtype, "rxvt", 4) != 0
|
||||||
&& color_env.string1
|
&& color_env.string1
|
||||||
|
@ -417,6 +421,9 @@ char* FTermDetection::termtype_256color_quirks()
|
||||||
|| (color_env.string6 && std::strlen(color_env.string6) > 0) )
|
|| (color_env.string6 && std::strlen(color_env.string6) > 0) )
|
||||||
terminal_type.kde_konsole = true;
|
terminal_type.kde_konsole = true;
|
||||||
|
|
||||||
|
if ( color_env.string3 && std::strlen(color_env.string3) > 0 )
|
||||||
|
decscusr_support = true;
|
||||||
|
|
||||||
if ( (color_env.string1 && std::strncmp(color_env.string1, "gnome-terminal", 14) == 0)
|
if ( (color_env.string1 && std::strncmp(color_env.string1, "gnome-terminal", 14) == 0)
|
||||||
|| color_env.string2 )
|
|| color_env.string2 )
|
||||||
{
|
{
|
||||||
|
@ -445,8 +452,10 @@ char* FTermDetection::determineMaxColor (char current_termtype[])
|
||||||
&& ! isNetBSDTerm()
|
&& ! isNetBSDTerm()
|
||||||
&& ! getXTermColorName(0).isEmpty() )
|
&& ! getXTermColorName(0).isEmpty() )
|
||||||
{
|
{
|
||||||
if ( ! getXTermColorName(256).isEmpty() )
|
if ( ! getXTermColorName(255).isEmpty() )
|
||||||
{
|
{
|
||||||
|
color256 = true;
|
||||||
|
|
||||||
if ( isPuttyTerminal() )
|
if ( isPuttyTerminal() )
|
||||||
new_termtype = C_STR("putty-256color");
|
new_termtype = C_STR("putty-256color");
|
||||||
else
|
else
|
||||||
|
@ -728,6 +737,10 @@ char* FTermDetection::secDA_Analysis (char current_termtype[])
|
||||||
new_termtype = secDA_Analysis_83(current_termtype);
|
new_termtype = secDA_Analysis_83(current_termtype);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 84: // tmux
|
||||||
|
new_termtype = secDA_Analysis_84(current_termtype);
|
||||||
|
break;
|
||||||
|
|
||||||
case 85: // rxvt-unicode
|
case 85: // rxvt-unicode
|
||||||
new_termtype = secDA_Analysis_85(current_termtype);
|
new_termtype = secDA_Analysis_85(current_termtype);
|
||||||
break;
|
break;
|
||||||
|
@ -834,6 +847,7 @@ inline char* FTermDetection::secDA_Analysis_77 (char[])
|
||||||
|
|
||||||
char* new_termtype;
|
char* new_termtype;
|
||||||
terminal_type.mintty = true;
|
terminal_type.mintty = true;
|
||||||
|
decscusr_support = true;
|
||||||
new_termtype = C_STR("xterm-256color");
|
new_termtype = C_STR("xterm-256color");
|
||||||
std::fflush(stdout);
|
std::fflush(stdout);
|
||||||
return new_termtype;
|
return new_termtype;
|
||||||
|
@ -866,6 +880,17 @@ inline char* FTermDetection::secDA_Analysis_83 (char current_termtype[])
|
||||||
return new_termtype;
|
return new_termtype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
inline char* FTermDetection::secDA_Analysis_84 (char current_termtype[])
|
||||||
|
{
|
||||||
|
// Terminal ID 84 - tmux
|
||||||
|
|
||||||
|
char* new_termtype = current_termtype;
|
||||||
|
terminal_type.screen = true;
|
||||||
|
terminal_type.tmux = true;
|
||||||
|
return new_termtype;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline char* FTermDetection::secDA_Analysis_85 (char current_termtype[])
|
inline char* FTermDetection::secDA_Analysis_85 (char current_termtype[])
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
// static class attributes
|
// static class attributes
|
||||||
int FTermios::stdin_no;
|
int FTermios::stdin_no;
|
||||||
int FTermios::stdout_no;
|
int FTermios::stdout_no;
|
||||||
|
int FTermios::stderr_no;
|
||||||
bool FTermios::raw_mode;
|
bool FTermios::raw_mode;
|
||||||
termios FTermios::term_init;
|
termios FTermios::term_init;
|
||||||
|
|
||||||
|
@ -56,6 +57,7 @@ void FTermios::init()
|
||||||
// Get file descriptor for standard input and standard output
|
// Get file descriptor for standard input and standard output
|
||||||
stdin_no = fileno(stdin);
|
stdin_no = fileno(stdin);
|
||||||
stdout_no = fileno(stdout);
|
stdout_no = fileno(stdout);
|
||||||
|
stderr_no = fileno(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -532,6 +532,7 @@ void FTermXTerminal::setXTerm8ColorDefaults()
|
||||||
|
|
||||||
if ( xterm_default_colors
|
if ( xterm_default_colors
|
||||||
&& ! (term_detection->isMinttyTerm()
|
&& ! (term_detection->isMinttyTerm()
|
||||||
|
|| term_detection->isMltermTerminal()
|
||||||
|| term_detection->isRxvtTerminal()
|
|| term_detection->isRxvtTerminal()
|
||||||
|| term_detection->isScreenTerm()) )
|
|| term_detection->isScreenTerm()) )
|
||||||
{
|
{
|
||||||
|
@ -559,6 +560,7 @@ void FTermXTerminal::setXTerm16ColorDefaults()
|
||||||
|
|
||||||
if ( xterm_default_colors
|
if ( xterm_default_colors
|
||||||
&& ! (term_detection->isMinttyTerm()
|
&& ! (term_detection->isMinttyTerm()
|
||||||
|
|| term_detection->isMltermTerminal()
|
||||||
|| term_detection->isRxvtTerminal()
|
|| term_detection->isRxvtTerminal()
|
||||||
|| term_detection->isScreenTerm()) )
|
|| term_detection->isScreenTerm()) )
|
||||||
{
|
{
|
||||||
|
@ -578,7 +580,8 @@ void FTermXTerminal::resetXTermColorMap()
|
||||||
&& term_detection->getGnomeTerminalID() < 3502 )
|
&& term_detection->getGnomeTerminalID() < 3502 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( term_detection->isPuttyTerminal() )
|
if ( term_detection->isPuttyTerminal()
|
||||||
|
|| term_detection->isMltermTerminal() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( term_detection->isXTerminal()
|
if ( term_detection->isXTerminal()
|
||||||
|
@ -601,7 +604,8 @@ void FTermXTerminal::resetXTermForeground()
|
||||||
&& term_detection->getGnomeTerminalID() < 3502 )
|
&& term_detection->getGnomeTerminalID() < 3502 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( term_detection->isPuttyTerminal() )
|
if ( term_detection->isPuttyTerminal()
|
||||||
|
|| term_detection->isMltermTerminal() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( term_detection->isXTerminal()
|
if ( term_detection->isXTerminal()
|
||||||
|
@ -624,7 +628,8 @@ void FTermXTerminal::resetXTermBackground()
|
||||||
&& term_detection->getGnomeTerminalID() < 3502 )
|
&& term_detection->getGnomeTerminalID() < 3502 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( term_detection->isPuttyTerminal() )
|
if ( term_detection->isPuttyTerminal()
|
||||||
|
|| term_detection->isMltermTerminal() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( term_detection->isXTerminal()
|
if ( term_detection->isXTerminal()
|
||||||
|
|
|
@ -10,6 +10,7 @@ noinst_PROGRAMS = \
|
||||||
fobject_test \
|
fobject_test \
|
||||||
fmouse_test \
|
fmouse_test \
|
||||||
fkeyboard_test \
|
fkeyboard_test \
|
||||||
|
ftermdetection_test \
|
||||||
ftermcapquirks_test \
|
ftermcapquirks_test \
|
||||||
foptimove_test \
|
foptimove_test \
|
||||||
foptiattr_test \
|
foptiattr_test \
|
||||||
|
@ -20,6 +21,7 @@ noinst_PROGRAMS = \
|
||||||
fobject_test_SOURCES = fobject-test.cpp
|
fobject_test_SOURCES = fobject-test.cpp
|
||||||
fmouse_test_SOURCES = fmouse-test.cpp
|
fmouse_test_SOURCES = fmouse-test.cpp
|
||||||
fkeyboard_test_SOURCES = fkeyboard-test.cpp
|
fkeyboard_test_SOURCES = fkeyboard-test.cpp
|
||||||
|
ftermdetection_test_SOURCES = ftermdetection-test.cpp
|
||||||
ftermcapquirks_test_SOURCES = ftermcapquirks-test.cpp
|
ftermcapquirks_test_SOURCES = ftermcapquirks-test.cpp
|
||||||
foptimove_test_SOURCES = foptimove-test.cpp
|
foptimove_test_SOURCES = foptimove-test.cpp
|
||||||
foptiattr_test_SOURCES = foptiattr-test.cpp
|
foptiattr_test_SOURCES = foptiattr-test.cpp
|
||||||
|
@ -30,6 +32,7 @@ frect_test_SOURCES = frect-test.cpp
|
||||||
TESTS = fobject_test \
|
TESTS = fobject_test \
|
||||||
fmouse_test \
|
fmouse_test \
|
||||||
fkeyboard_test \
|
fkeyboard_test \
|
||||||
|
ftermdetection_test \
|
||||||
ftermcapquirks_test \
|
ftermcapquirks_test \
|
||||||
foptimove_test \
|
foptimove_test \
|
||||||
foptiattr_test \
|
foptiattr_test \
|
||||||
|
|
|
@ -85,6 +85,7 @@ host_triplet = @host@
|
||||||
@CPPUNIT_TEST_TRUE@noinst_PROGRAMS = fobject_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@noinst_PROGRAMS = fobject_test$(EXEEXT) \
|
||||||
@CPPUNIT_TEST_TRUE@ fmouse_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@ fmouse_test$(EXEEXT) \
|
||||||
@CPPUNIT_TEST_TRUE@ fkeyboard_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@ fkeyboard_test$(EXEEXT) \
|
||||||
|
@CPPUNIT_TEST_TRUE@ ftermdetection_test$(EXEEXT) \
|
||||||
@CPPUNIT_TEST_TRUE@ ftermcapquirks_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@ ftermcapquirks_test$(EXEEXT) \
|
||||||
@CPPUNIT_TEST_TRUE@ foptimove_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@ foptimove_test$(EXEEXT) \
|
||||||
@CPPUNIT_TEST_TRUE@ foptiattr_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@ foptiattr_test$(EXEEXT) \
|
||||||
|
@ -92,6 +93,7 @@ host_triplet = @host@
|
||||||
@CPPUNIT_TEST_TRUE@ frect_test$(EXEEXT)
|
@CPPUNIT_TEST_TRUE@ frect_test$(EXEEXT)
|
||||||
@CPPUNIT_TEST_TRUE@TESTS = fobject_test$(EXEEXT) fmouse_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@TESTS = fobject_test$(EXEEXT) fmouse_test$(EXEEXT) \
|
||||||
@CPPUNIT_TEST_TRUE@ fkeyboard_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@ fkeyboard_test$(EXEEXT) \
|
||||||
|
@CPPUNIT_TEST_TRUE@ ftermdetection_test$(EXEEXT) \
|
||||||
@CPPUNIT_TEST_TRUE@ ftermcapquirks_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@ ftermcapquirks_test$(EXEEXT) \
|
||||||
@CPPUNIT_TEST_TRUE@ foptimove_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@ foptimove_test$(EXEEXT) \
|
||||||
@CPPUNIT_TEST_TRUE@ foptiattr_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@ foptiattr_test$(EXEEXT) \
|
||||||
|
@ -116,6 +118,7 @@ CONFIG_CLEAN_VPATH_FILES =
|
||||||
@CPPUNIT_TEST_TRUE@am__EXEEXT_1 = fobject_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@am__EXEEXT_1 = fobject_test$(EXEEXT) \
|
||||||
@CPPUNIT_TEST_TRUE@ fmouse_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@ fmouse_test$(EXEEXT) \
|
||||||
@CPPUNIT_TEST_TRUE@ fkeyboard_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@ fkeyboard_test$(EXEEXT) \
|
||||||
|
@CPPUNIT_TEST_TRUE@ ftermdetection_test$(EXEEXT) \
|
||||||
@CPPUNIT_TEST_TRUE@ ftermcapquirks_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@ ftermcapquirks_test$(EXEEXT) \
|
||||||
@CPPUNIT_TEST_TRUE@ foptimove_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@ foptimove_test$(EXEEXT) \
|
||||||
@CPPUNIT_TEST_TRUE@ foptiattr_test$(EXEEXT) \
|
@CPPUNIT_TEST_TRUE@ foptiattr_test$(EXEEXT) \
|
||||||
|
@ -166,6 +169,11 @@ am__ftermcapquirks_test_SOURCES_DIST = ftermcapquirks-test.cpp
|
||||||
@CPPUNIT_TEST_TRUE@ ftermcapquirks-test.$(OBJEXT)
|
@CPPUNIT_TEST_TRUE@ ftermcapquirks-test.$(OBJEXT)
|
||||||
ftermcapquirks_test_OBJECTS = $(am_ftermcapquirks_test_OBJECTS)
|
ftermcapquirks_test_OBJECTS = $(am_ftermcapquirks_test_OBJECTS)
|
||||||
ftermcapquirks_test_LDADD = $(LDADD)
|
ftermcapquirks_test_LDADD = $(LDADD)
|
||||||
|
am__ftermdetection_test_SOURCES_DIST = ftermdetection-test.cpp
|
||||||
|
@CPPUNIT_TEST_TRUE@am_ftermdetection_test_OBJECTS = \
|
||||||
|
@CPPUNIT_TEST_TRUE@ ftermdetection-test.$(OBJEXT)
|
||||||
|
ftermdetection_test_OBJECTS = $(am_ftermdetection_test_OBJECTS)
|
||||||
|
ftermdetection_test_LDADD = $(LDADD)
|
||||||
AM_V_P = $(am__v_P_@AM_V@)
|
AM_V_P = $(am__v_P_@AM_V@)
|
||||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||||
am__v_P_0 = false
|
am__v_P_0 = false
|
||||||
|
@ -204,7 +212,7 @@ SOURCES = $(fkeyboard_test_SOURCES) $(fmouse_test_SOURCES) \
|
||||||
$(fobject_test_SOURCES) $(foptiattr_test_SOURCES) \
|
$(fobject_test_SOURCES) $(foptiattr_test_SOURCES) \
|
||||||
$(foptimove_test_SOURCES) $(fpoint_test_SOURCES) \
|
$(foptimove_test_SOURCES) $(fpoint_test_SOURCES) \
|
||||||
$(frect_test_SOURCES) $(fstring_test_SOURCES) \
|
$(frect_test_SOURCES) $(fstring_test_SOURCES) \
|
||||||
$(ftermcapquirks_test_SOURCES)
|
$(ftermcapquirks_test_SOURCES) $(ftermdetection_test_SOURCES)
|
||||||
DIST_SOURCES = $(am__fkeyboard_test_SOURCES_DIST) \
|
DIST_SOURCES = $(am__fkeyboard_test_SOURCES_DIST) \
|
||||||
$(am__fmouse_test_SOURCES_DIST) \
|
$(am__fmouse_test_SOURCES_DIST) \
|
||||||
$(am__fobject_test_SOURCES_DIST) \
|
$(am__fobject_test_SOURCES_DIST) \
|
||||||
|
@ -212,7 +220,8 @@ DIST_SOURCES = $(am__fkeyboard_test_SOURCES_DIST) \
|
||||||
$(am__foptimove_test_SOURCES_DIST) \
|
$(am__foptimove_test_SOURCES_DIST) \
|
||||||
$(am__fpoint_test_SOURCES_DIST) $(am__frect_test_SOURCES_DIST) \
|
$(am__fpoint_test_SOURCES_DIST) $(am__frect_test_SOURCES_DIST) \
|
||||||
$(am__fstring_test_SOURCES_DIST) \
|
$(am__fstring_test_SOURCES_DIST) \
|
||||||
$(am__ftermcapquirks_test_SOURCES_DIST)
|
$(am__ftermcapquirks_test_SOURCES_DIST) \
|
||||||
|
$(am__ftermdetection_test_SOURCES_DIST)
|
||||||
am__can_run_installinfo = \
|
am__can_run_installinfo = \
|
||||||
case $$AM_UPDATE_INFO_DIR in \
|
case $$AM_UPDATE_INFO_DIR in \
|
||||||
n|no|NO) false;; \
|
n|no|NO) false;; \
|
||||||
|
@ -573,6 +582,7 @@ top_srcdir = @top_srcdir@
|
||||||
@CPPUNIT_TEST_TRUE@fobject_test_SOURCES = fobject-test.cpp
|
@CPPUNIT_TEST_TRUE@fobject_test_SOURCES = fobject-test.cpp
|
||||||
@CPPUNIT_TEST_TRUE@fmouse_test_SOURCES = fmouse-test.cpp
|
@CPPUNIT_TEST_TRUE@fmouse_test_SOURCES = fmouse-test.cpp
|
||||||
@CPPUNIT_TEST_TRUE@fkeyboard_test_SOURCES = fkeyboard-test.cpp
|
@CPPUNIT_TEST_TRUE@fkeyboard_test_SOURCES = fkeyboard-test.cpp
|
||||||
|
@CPPUNIT_TEST_TRUE@ftermdetection_test_SOURCES = ftermdetection-test.cpp
|
||||||
@CPPUNIT_TEST_TRUE@ftermcapquirks_test_SOURCES = ftermcapquirks-test.cpp
|
@CPPUNIT_TEST_TRUE@ftermcapquirks_test_SOURCES = ftermcapquirks-test.cpp
|
||||||
@CPPUNIT_TEST_TRUE@foptimove_test_SOURCES = foptimove-test.cpp
|
@CPPUNIT_TEST_TRUE@foptimove_test_SOURCES = foptimove-test.cpp
|
||||||
@CPPUNIT_TEST_TRUE@foptiattr_test_SOURCES = foptiattr-test.cpp
|
@CPPUNIT_TEST_TRUE@foptiattr_test_SOURCES = foptiattr-test.cpp
|
||||||
|
@ -668,6 +678,10 @@ ftermcapquirks_test$(EXEEXT): $(ftermcapquirks_test_OBJECTS) $(ftermcapquirks_te
|
||||||
@rm -f ftermcapquirks_test$(EXEEXT)
|
@rm -f ftermcapquirks_test$(EXEEXT)
|
||||||
$(AM_V_CXXLD)$(CXXLINK) $(ftermcapquirks_test_OBJECTS) $(ftermcapquirks_test_LDADD) $(LIBS)
|
$(AM_V_CXXLD)$(CXXLINK) $(ftermcapquirks_test_OBJECTS) $(ftermcapquirks_test_LDADD) $(LIBS)
|
||||||
|
|
||||||
|
ftermdetection_test$(EXEEXT): $(ftermdetection_test_OBJECTS) $(ftermdetection_test_DEPENDENCIES) $(EXTRA_ftermdetection_test_DEPENDENCIES)
|
||||||
|
@rm -f ftermdetection_test$(EXEEXT)
|
||||||
|
$(AM_V_CXXLD)$(CXXLINK) $(ftermdetection_test_OBJECTS) $(ftermdetection_test_LDADD) $(LIBS)
|
||||||
|
|
||||||
mostlyclean-compile:
|
mostlyclean-compile:
|
||||||
-rm -f *.$(OBJEXT)
|
-rm -f *.$(OBJEXT)
|
||||||
|
|
||||||
|
@ -683,6 +697,7 @@ distclean-compile:
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frect-test.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frect-test.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstring-test.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstring-test.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftermcapquirks-test.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftermcapquirks-test.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftermdetection-test.Po@am__quote@
|
||||||
|
|
||||||
.cpp.o:
|
.cpp.o:
|
||||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||||
|
@ -925,6 +940,13 @@ fkeyboard_test.log: fkeyboard_test$(EXEEXT)
|
||||||
--log-file $$b.log --trs-file $$b.trs \
|
--log-file $$b.log --trs-file $$b.trs \
|
||||||
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
||||||
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
|
ftermdetection_test.log: ftermdetection_test$(EXEEXT)
|
||||||
|
@p='ftermdetection_test$(EXEEXT)'; \
|
||||||
|
b='ftermdetection_test'; \
|
||||||
|
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
|
||||||
|
--log-file $$b.log --trs-file $$b.trs \
|
||||||
|
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
|
||||||
|
"$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
ftermcapquirks_test.log: ftermcapquirks_test$(EXEEXT)
|
ftermcapquirks_test.log: ftermcapquirks_test$(EXEEXT)
|
||||||
@p='ftermcapquirks_test$(EXEEXT)'; \
|
@p='ftermcapquirks_test$(EXEEXT)'; \
|
||||||
b='ftermcapquirks_test'; \
|
b='ftermcapquirks_test'; \
|
||||||
|
|
|
@ -229,7 +229,7 @@ void FTermcapQuirksTest::generalTest()
|
||||||
{
|
{
|
||||||
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
||||||
test::tcap_map* caps = new test::tcap_map[last_item];
|
test::tcap_map* caps = new test::tcap_map[last_item];
|
||||||
|
|
||||||
for (int i = 0; i < last_item; i++)
|
for (int i = 0; i < last_item; i++)
|
||||||
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
||||||
|
|
||||||
|
@ -292,10 +292,10 @@ void FTermcapQuirksTest::xtermTest()
|
||||||
{
|
{
|
||||||
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
||||||
test::tcap_map* caps = new test::tcap_map[last_item];
|
test::tcap_map* caps = new test::tcap_map[last_item];
|
||||||
|
|
||||||
for (int i = 0; i < last_item; i++)
|
for (int i = 0; i < last_item; i++)
|
||||||
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
||||||
|
|
||||||
FTermcapQuirks quirks;
|
FTermcapQuirks quirks;
|
||||||
FTermDetection detect;
|
FTermDetection detect;
|
||||||
detect.setXTerminal (true);
|
detect.setXTerminal (true);
|
||||||
|
@ -323,7 +323,7 @@ void FTermcapQuirksTest::freebsdTest()
|
||||||
{
|
{
|
||||||
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
||||||
test::tcap_map* caps = new test::tcap_map[last_item];
|
test::tcap_map* caps = new test::tcap_map[last_item];
|
||||||
|
|
||||||
for (int i = 0; i < last_item; i++)
|
for (int i = 0; i < last_item; i++)
|
||||||
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
||||||
|
|
||||||
|
@ -362,7 +362,7 @@ void FTermcapQuirksTest::cygwinTest()
|
||||||
{
|
{
|
||||||
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
||||||
test::tcap_map* caps = new test::tcap_map[last_item];
|
test::tcap_map* caps = new test::tcap_map[last_item];
|
||||||
|
|
||||||
for (int i = 0; i < last_item; i++)
|
for (int i = 0; i < last_item; i++)
|
||||||
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
||||||
|
|
||||||
|
@ -389,7 +389,7 @@ void FTermcapQuirksTest::linuxTest()
|
||||||
{
|
{
|
||||||
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
||||||
test::tcap_map* caps = new test::tcap_map[last_item];
|
test::tcap_map* caps = new test::tcap_map[last_item];
|
||||||
|
|
||||||
for (int i = 0; i < last_item; i++)
|
for (int i = 0; i < last_item; i++)
|
||||||
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
||||||
|
|
||||||
|
@ -413,7 +413,7 @@ void FTermcapQuirksTest::linuxTest()
|
||||||
// 16 colors
|
// 16 colors
|
||||||
FTermcap::max_color = 16;
|
FTermcap::max_color = 16;
|
||||||
quirks.terminalFixup();
|
quirks.terminalFixup();
|
||||||
|
|
||||||
CPPUNIT_ASSERT_CSTRING ( caps[fc::t_set_a_foreground].string
|
CPPUNIT_ASSERT_CSTRING ( caps[fc::t_set_a_foreground].string
|
||||||
, C_STR(CSI "3%p1%{8}%m%d%?%p1%{7}%>%t;1%e;22%;m") );
|
, C_STR(CSI "3%p1%{8}%m%d%?%p1%{7}%>%t;1%e;22%;m") );
|
||||||
CPPUNIT_ASSERT_CSTRING ( caps[fc::t_set_a_background].string
|
CPPUNIT_ASSERT_CSTRING ( caps[fc::t_set_a_background].string
|
||||||
|
@ -463,7 +463,7 @@ void FTermcapQuirksTest::rxvtTest()
|
||||||
{
|
{
|
||||||
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
||||||
test::tcap_map* caps = new test::tcap_map[last_item];
|
test::tcap_map* caps = new test::tcap_map[last_item];
|
||||||
|
|
||||||
for (int i = 0; i < last_item; i++)
|
for (int i = 0; i < last_item; i++)
|
||||||
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
||||||
|
|
||||||
|
@ -495,7 +495,7 @@ void FTermcapQuirksTest::rxvtTest()
|
||||||
, C_STR(CSI "%?%p1%{8}%<%t%p1%{30}%+%e%p1%'R'%+%;%dm") );
|
, C_STR(CSI "%?%p1%{8}%<%t%p1%{30}%+%e%p1%'R'%+%;%dm") );
|
||||||
CPPUNIT_ASSERT_CSTRING ( caps[fc::t_set_a_background].string
|
CPPUNIT_ASSERT_CSTRING ( caps[fc::t_set_a_background].string
|
||||||
, C_STR(CSI "%?%p1%{8}%<%t%p1%'('%+%e%p1%{92}%+%;%dm") );
|
, C_STR(CSI "%?%p1%{8}%<%t%p1%'('%+%e%p1%{92}%+%;%dm") );
|
||||||
|
|
||||||
detect.setUrxvtTerminal (false);
|
detect.setUrxvtTerminal (false);
|
||||||
detect.setRxvtTerminal (false);
|
detect.setRxvtTerminal (false);
|
||||||
delete[] caps;
|
delete[] caps;
|
||||||
|
@ -506,7 +506,7 @@ void FTermcapQuirksTest::vteTest()
|
||||||
{
|
{
|
||||||
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
||||||
test::tcap_map* caps = new test::tcap_map[last_item];
|
test::tcap_map* caps = new test::tcap_map[last_item];
|
||||||
|
|
||||||
for (int i = 0; i < last_item; i++)
|
for (int i = 0; i < last_item; i++)
|
||||||
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
||||||
|
|
||||||
|
@ -532,7 +532,7 @@ void FTermcapQuirksTest::puttyTest()
|
||||||
{
|
{
|
||||||
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
||||||
test::tcap_map* caps = new test::tcap_map[last_item];
|
test::tcap_map* caps = new test::tcap_map[last_item];
|
||||||
|
|
||||||
for (int i = 0; i < last_item; i++)
|
for (int i = 0; i < last_item; i++)
|
||||||
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
||||||
|
|
||||||
|
@ -617,7 +617,7 @@ void FTermcapQuirksTest::teratermTest()
|
||||||
{
|
{
|
||||||
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
||||||
test::tcap_map* caps = new test::tcap_map[last_item];
|
test::tcap_map* caps = new test::tcap_map[last_item];
|
||||||
|
|
||||||
for (int i = 0; i < last_item; i++)
|
for (int i = 0; i < last_item; i++)
|
||||||
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
||||||
|
|
||||||
|
@ -649,7 +649,7 @@ void FTermcapQuirksTest::sunTest()
|
||||||
{
|
{
|
||||||
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
||||||
test::tcap_map* caps = new test::tcap_map[last_item];
|
test::tcap_map* caps = new test::tcap_map[last_item];
|
||||||
|
|
||||||
for (int i = 0; i < last_item; i++)
|
for (int i = 0; i < last_item; i++)
|
||||||
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
||||||
|
|
||||||
|
@ -673,7 +673,7 @@ void FTermcapQuirksTest::screenTest()
|
||||||
{
|
{
|
||||||
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
const int last_item = int(sizeof(test::tcap) / sizeof(test::tcap[0])) - 1;
|
||||||
test::tcap_map* caps = new test::tcap_map[last_item];
|
test::tcap_map* caps = new test::tcap_map[last_item];
|
||||||
|
|
||||||
for (int i = 0; i < last_item; i++)
|
for (int i = 0; i < last_item; i++)
|
||||||
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
memcpy(&caps[i], &test::tcap[i], sizeof(test::tcap[0]));
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -19,7 +19,6 @@ int main (int, char**)
|
||||||
CPPUNIT_NS::TestRunner testrunner;
|
CPPUNIT_NS::TestRunner testrunner;
|
||||||
testrunner.addTest (CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
|
testrunner.addTest (CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
|
||||||
testrunner.run (testresult);
|
testrunner.run (testresult);
|
||||||
|
|
||||||
// Outputting results in compiler format
|
// Outputting results in compiler format
|
||||||
CPPUNIT_NS::CompilerOutputter compileroutputter ( &collectedresults
|
CPPUNIT_NS::CompilerOutputter compileroutputter ( &collectedresults
|
||||||
, std::cerr );
|
, std::cerr );
|
||||||
|
|
Loading…
Reference in New Issue