From 22c700a4f6687c585ae6873ce2d1a2a92a2533d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Aum=C3=BCller?= <aumuell@reserv.at>
Date: Tue, 5 Jan 2010 18:42:24 +0100
Subject: [PATCH] fakevim: auto tests for 'o'/'O' at beginning and end of file

Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
---
 tests/auto/fakevim/main.cpp | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/auto/fakevim/main.cpp b/tests/auto/fakevim/main.cpp
index 755a95c0d00..9d7cd35fa98 100644
--- a/tests/auto/fakevim/main.cpp
+++ b/tests/auto/fakevim/main.cpp
@@ -59,6 +59,7 @@ private slots:
     void indentation();
 
     // command mode
+    void command_oO();
     void command_Cxx_down_dot();
     void command_Gyyp();
     void command_J();
@@ -620,6 +621,19 @@ return; // FIXME: not in sync with Gui behaviour?
 }
 
 
+void tst_FakeVim::command_oO()
+{
+    setup();
+    check("gg",              "@" + lmid(0));
+    check("Ol1" + escape,    "l@1\n" + lmid(0));
+    check("gg",              "@l1\n" + lmid(0));
+    check("ol2" + escape,    "l1\n" "l@2\n" + lmid(0));
+    check("G$",              "l1\n" "l2\n" + lmid(0)+"@");
+    check("ol-1" + escape,   "l1\n" "l2\n" + lmid(0)+"\n" + "l-@1");
+    check("G",               "l1\n" "l2\n" + lmid(0)+"\n" + "@l-1");
+    check("Ol-2" + escape,   "l1\n" "l2\n" + lmid(0)+"\n" + "l-@2\n" + "l-1");
+}
+
 /*
 
 #include <QtCore>
-- 
GitLab