#3910 Add compdat export test with 132 line length and 133 line length.

This commit is contained in:
Gaute Lindkvist
2018-12-20 10:18:13 +01:00
parent 66c58bad28
commit 5c9b8b36f9
2 changed files with 8 additions and 8 deletions

View File

@@ -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();

View File

@@ -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());