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