Phase 3 Testing Guide: Enhanced Editing
This document outlines how to test the new Phase 3 features.
Prerequisites
Build the project:
cd /Users/user/Projects/lumacs
cmake --build build
Start editor with a test file:
./build/lumacs test_highlight.lua
1. Word Operations
Kill Word (M-d)
- Place cursor at the beginning of a word (e.g., "local").
- Press
M-d (Meta+d or ESC then d).
- Expected: The word "local" is deleted.
- Move cursor elsewhere and press
C-y.
- Expected: "local" is pasted (yanked).
Backward Kill Word (M-Backspace)
- Place cursor at the end of a word.
- Press
M-Backspace (Meta+Backspace or ESC then Backspace).
- Expected: The word before cursor is deleted.
- Press
C-y.
- Expected: Deleted word is pasted.
2. Case Conversion
Word Case (M-u, M-l, M-c)
- Type "hello world".
- Cursor at start of "hello".
- Press
M-u (upcase-word).
- Expected: "HELLO world", cursor after "HELLO".
- Press
M-l (downcase-word).
- Expected: "hello world", cursor after "world" (since it moved forward).
- Move back to start. Press
M-c (capitalize-word).
Region Case (C-x C-u, C-x C-l)
- Select "Hello World" (using
C-@ and movement).
- Press
C-x C-u.
- Select again. Press
C-x C-l.
3. Commenting (M-;)
- Open a lua file (e.g.,
test_highlight.lua).
- Place cursor on a line of code.
- Press
M-;.
- Expected: Line is commented (
-- code).
- Press
M-; again.
- Expected: Line is uncommented.
- Select multiple lines.
- Press
M-;.
- Expected: All lines commented.
- Press
M-; again.
- Expected: All lines uncommented.
4. Incremental Search (C-s, C-r)
Forward Search (C-s)
- Press
C-s. Status line should show [I-SEARCH].
- Type "fun".
- Expected: Cursor moves to first "fun", match highlighted in green.
- Minibuffer shows "I-search: fun".
- Press
C-s again.
- Expected: Moves to next occurrence.
- Press
Backspace.
- Expected: Goes back to "fu" search result.
- Press
RET.
- Expected: Search ends, cursor stays at match.
Backward Search (C-r)
- Go to end of buffer (
M->).
- Press
C-r. Status shows [I-SEARCH].
- Type "local".
- Expected: Finds last "local" in file.
- Press
C-r again.
- Expected: Finds previous occurrence.
- Press
C-g (or ESC).
- Expected: Cancel search, cursor returns to start position (end of buffer).
Debugging
Check lumacs_debug.log for details.