mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3910 Add compdat export test with 132 line length and 133 line length.
This commit is contained in:
@@ -145,7 +145,7 @@ void RifEclipseDataTableFormatter::outputBuffer()
|
||||
else if (line.lineType == CONTENTS)
|
||||
{
|
||||
QString lineText = m_tableRowPrependText;
|
||||
QString appendText = (line.appendTextSet ? line.appendText : m_tableRowAppendText) + "\n";
|
||||
QString appendText = (line.appendTextSet ? line.appendText : m_tableRowAppendText);
|
||||
|
||||
for (size_t i = 0; i < line.data.size(); ++i)
|
||||
{
|
||||
@@ -163,7 +163,7 @@ void RifEclipseDataTableFormatter::outputBuffer()
|
||||
lineText += column;
|
||||
}
|
||||
|
||||
m_out << lineText << appendText;
|
||||
m_out << lineText << appendText << "\n";
|
||||
}
|
||||
}
|
||||
m_columns.clear();
|
||||
|
||||
@@ -110,11 +110,11 @@ TEST(RifEclipseDataTableFormatter, LongLine)
|
||||
|
||||
formatter.rowCompleted();
|
||||
formatter.tableCompleted();
|
||||
std::cout << tableText.toStdString() << std::endl;
|
||||
|
||||
QStringList tableLines = tableText.split(QRegExp("[\r\n]"), QString::SkipEmptyParts);
|
||||
for (QString line : tableLines)
|
||||
{
|
||||
std::cout << QString("Line: \"%1\"").arg(line).toStdString() << std::endl;
|
||||
if (!line.startsWith(formatter.commentPrefix()))
|
||||
{
|
||||
EXPECT_LE(line.length(), RifEclipseDataTableFormatter::maxEclipseRowWidth());
|
||||
@@ -141,8 +141,8 @@ TEST(RifEclipseDataTableFormatter, LongLine132)
|
||||
};
|
||||
|
||||
formatter.header(header);
|
||||
QString fiftyCharacterWellName = "01234567890";
|
||||
formatter.add(fiftyCharacterWellName);
|
||||
QString tenCharacterWellName = "0123456789";
|
||||
formatter.add(tenCharacterWellName);
|
||||
for (int i = 0; i < 7; ++i)
|
||||
{
|
||||
formatter.add(std::numeric_limits<int>::max()); // 10 characters
|
||||
@@ -157,11 +157,11 @@ TEST(RifEclipseDataTableFormatter, LongLine132)
|
||||
|
||||
formatter.rowCompleted();
|
||||
formatter.tableCompleted();
|
||||
std::cout << tableText.toStdString() << std::endl;
|
||||
|
||||
QStringList tableLines = tableText.split(QRegExp("[\r\n]"), QString::SkipEmptyParts);
|
||||
for (QString line : tableLines)
|
||||
{
|
||||
std::cout << QString("Line: \"%1\"").arg(line).toStdString() << std::endl;
|
||||
if (line.startsWith("0"))
|
||||
{
|
||||
EXPECT_EQ(line.length(), RifEclipseDataTableFormatter::maxEclipseRowWidth());
|
||||
@@ -188,7 +188,7 @@ TEST(RifEclipseDataTableFormatter, LongLine133)
|
||||
};
|
||||
|
||||
formatter.header(header);
|
||||
QString fiftyCharacterWellName = "01234567890";
|
||||
QString fiftyCharacterWellName = "0123456789";
|
||||
formatter.add(fiftyCharacterWellName);
|
||||
for (int i = 0; i < 7; ++i)
|
||||
{
|
||||
@@ -204,11 +204,11 @@ TEST(RifEclipseDataTableFormatter, LongLine133)
|
||||
|
||||
formatter.rowCompleted();
|
||||
formatter.tableCompleted();
|
||||
std::cout << tableText.toStdString() << std::endl;
|
||||
|
||||
QStringList tableLines = tableText.split(QRegExp("[\r\n]"), QString::SkipEmptyParts);
|
||||
for (QString line : tableLines)
|
||||
{
|
||||
std::cout << QString("Line: \"%1\"").arg(line).toStdString() << std::endl;
|
||||
if (line.startsWith("0"))
|
||||
{
|
||||
EXPECT_LE(line.length(), RifEclipseDataTableFormatter::maxEclipseRowWidth());
|
||||
|
||||
Reference in New Issue
Block a user