Commit 9c72646c0e
Verified · cmc
Layout: unified · split
Tests/OrgEditorAppKitTests/ViewToggleTests.swift +4 −3
| @@ -1,5 +1,6 @@ | |||
| 1 | import AppKit | 1 | import AppKit |
| 2 | import OrgCore | 2 | import OrgCore |
| 3 | import OrgDocument | ||
| 3 | import Testing | 4 | import Testing |
| 4 | @testable import OrgEditorAppKit | 5 | @testable import OrgEditorAppKit |
| 5 | 6 | ||
| @@ -44,9 +45,9 @@ struct ViewToggleTests { | |||
| 44 | 45 | ||
| 45 | @Test func gjMovesByScreenLines() { | 46 | @Test func gjMovesByScreenLines() { |
| 46 | let long = Array(repeating: "word", count: 60).joined(separator: " ") | 47 | let long = Array(repeating: "word", count: 60).joined(separator: " ") |
| 47 | let h = Harness(long + "\nnext\n") | 48 | // In Org files gj is evil-org's element motion; elsewhere it's screen lines. |
| 48 | // Doom binds `g j` to the next heading; without that binding it's the engine's. | 49 | let h = Harness(DocumentState(bytes: Array((long + "\nnext\n").utf8)), mode: .plain(language: nil)) |
| 49 | h.editor.keymap = KeymapPreset.emacs.keymap | 50 | h.editor.keymap = KeymapPreset.doom.keymap |
| 50 | h.editor.modal = true | 51 | h.editor.modal = true |
| 51 | h.caret(at: 0) | 52 | h.caret(at: 0) |
| 52 | h.caret(at: 0) | 53 | h.caret(at: 0) |