diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-12-15 18:07:51 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-12-15 20:23:02 +0000 |
| commit | 7267b8281fbcc21d96bb8cb760d2a4e881b4d5e5 (patch) | |
| tree | 74891181f3d7b078bb6e1f4424e0449d843ac626 /src/unit_tests.cc | |
| parent | e369b60258ba48eeeb53a91d15e6ae1a9bb6f10f (diff) | |
Move insert and erase to normal.cc, and move edition management to context
Diffstat (limited to 'src/unit_tests.cc')
| -rw-r--r-- | src/unit_tests.cc | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/unit_tests.cc b/src/unit_tests.cc index d3cda91d..8bd0c5fc 100644 --- a/src/unit_tests.cc +++ b/src/unit_tests.cc @@ -68,30 +68,6 @@ void test_undo_group_optimizer() kak_assert(lines[i] == buffer[LineCount((int)i)]); } -void test_editor() -{ - using namespace std::placeholders; - Buffer buffer("test", Buffer::Flags::None, { "test\n", "\n", "youpi\n" }); - Editor editor(buffer); - - { - scoped_edition edition{editor}; - select_whole_buffer(buffer, editor.selections()); - select_all_matches(buffer, editor.selections(), Regex{"\\n\\h*"}); - for (auto& sel : editor.selections()) - { - kak_assert(buffer.byte_at(sel.min()) == '\n'); - erase(buffer, sel); - } - } - editor.undo(); - - Selection sel{ 2_line, buffer.back_coord() }; - editor.selections() = SelectionList{sel}; - editor.insert("",InsertMode::Replace); - kak_assert(not buffer.is_end(editor.selections().main().first())); -} - void test_utf8() { String str = "maïs mélange bientôt"; @@ -146,5 +122,4 @@ void run_unit_tests() test_keys(); test_buffer(); test_undo_group_optimizer(); - test_editor(); } |
