for (auto nIgnoreWhitespace: { WHITESPACE_COMPARE_ALL, WHITESPACE_IGNORE_CHANGE, WHITESPACE_IGNORE_ALL})\r
{\r
GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_WHITESPACE, nIgnoreWhitespace);\r
+ if (pDoc)\r
+ pDoc->RefreshOptions();\r
for (size_t l = 0; l < std::size(filelist); ++l)\r
{\r
for (size_t r = 0; r < std::size(filelist); ++r)\r
}\r
else\r
{\r
- CMergeEditView *pView = pDoc->GetView(0, 0);\r
- // merge\r
- EXPECT_EQ(1, pDoc->m_diffList.GetSize());\r
- pDoc->CopyAllList(0, 1);\r
- EXPECT_EQ(0, pDoc->m_diffList.GetSize());\r
- // undo\r
- pView->SendMessage(WM_COMMAND, ID_EDIT_UNDO);\r
- EXPECT_EQ(1, pDoc->m_diffList.GetSize());\r
- // insert a character at the last line\r
- pView->GotoLine(pDoc->m_ptBuf[0]->GetLineCount() - 1, false, 0);\r
- pView->SendMessage(WM_CHAR, 'a');\r
- // undo\r
- pView->SendMessage(WM_COMMAND, ID_EDIT_UNDO);\r
-\r
- pView = pDoc->GetView(0, 1);\r
- pView->GotoLine(0, false, 1);\r
- // Select all & Delete\r
- pView->SendMessage(WM_COMMAND, ID_EDIT_SELECT_ALL);\r
- pView->SendMessage(WM_COMMAND, ID_EDIT_DELETE);\r
- // undo\r
- pView->SendMessage(WM_COMMAND, ID_EDIT_UNDO);\r
- // redo\r
- pView->SendMessage(WM_COMMAND, ID_EDIT_REDO);\r
- // undo\r
- pView->SendMessage(WM_COMMAND, ID_EDIT_UNDO);\r
+ if (pDoc->m_diffList.DiffRangeAt(0)->op == OP_TRIVIAL)\r
+ {\r
+ EXPECT_EQ(true, bIgnoreBlankLines);\r
+ }\r
+ else\r
+ {\r
+ CMergeEditView *pView = pDoc->GetView(0, 0); // merge\r
+ EXPECT_EQ(1, pDoc->m_diffList.GetSize());\r
+ pDoc->CopyAllList(0, 1);\r
+ EXPECT_EQ(0, pDoc->m_diffList.GetSize());\r
+ // undo\r
+ pView->SendMessage(WM_COMMAND, ID_EDIT_UNDO);\r
+ EXPECT_EQ(1, pDoc->m_diffList.GetSize());\r
+ // insert a character at the last line\r
+ pView->GotoLine(pDoc->m_ptBuf[0]->GetLineCount() - 1, false, 0);\r
+ pView->SendMessage(WM_CHAR, 'a');\r
+ // undo\r
+ pView->SendMessage(WM_COMMAND, ID_EDIT_UNDO);\r
+\r
+ pView = pDoc->GetView(0, 1);\r
+ pView->GotoLine(0, false, 1);\r
+ // Select all & Delete\r
+ pView->SendMessage(WM_COMMAND, ID_EDIT_SELECT_ALL);\r
+ pView->SendMessage(WM_COMMAND, ID_EDIT_DELETE);\r
+ // undo\r
+ pView->SendMessage(WM_COMMAND, ID_EDIT_UNDO);\r
+ // redo\r
+ pView->SendMessage(WM_COMMAND, ID_EDIT_REDO);\r
+ // undo\r
+ pView->SendMessage(WM_COMMAND, ID_EDIT_UNDO);\r
+ }\r
}\r
}\r
}\r