Skip to content

Commit

Permalink
initiate terminal_test bughunt
Browse files Browse the repository at this point in the history
  • Loading branch information
christianparpart committed Dec 10, 2021
1 parent 0a76d1a commit 68180fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/terminal/Grid_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,17 +416,17 @@ TEST_CASE("resize_shrink_lines_with_history", "[grid]")
grid.setLineText(LineOffset(-1), "ABC"); // history line
grid.setLineText(LineOffset(0), "DEF"); // main page: line 1
grid.setLineText(LineOffset(1), "GHI"); // main page: line 2
CHECK(grid.historyLineCount() == LineCount(1));
CHECK(grid.historyLineCount() == LineCount(1)); // TODO: move line up, below scrollUp()

// shrink by one line
auto const newPageSize = PageSize{LineCount(1), ColumnCount(3)};
auto const curCursorPos = Coordinate{LineOffset(1), ColumnOffset(1)};
logGridText(grid, "BEFORE");
logGridTextAlways(grid, "BEFORE");
Coordinate newCursorPos = grid.resize(newPageSize, curCursorPos, false);
logGridText(grid, "AFTER");
logGridTextAlways(grid, "AFTER");
CHECK(grid.pageSize().columns == ColumnCount(3));
CHECK(grid.pageSize().lines == LineCount(1));
CHECK(grid.historyLineCount() == LineCount(2));
CHECK(grid.historyLineCount() == LineCount(2)); // XXX FIXME: test failing
CHECK(grid.lineText(LineOffset(-2)) == "ABC");
CHECK(grid.lineText(LineOffset(-1)) == "DEF");
CHECK(grid.lineText(LineOffset( 0)) == "GHI");
Expand Down

0 comments on commit 68180fa

Please sign in to comment.