Re-enable parts of editor-test

This commit is contained in:
Jeremy Soller 2022-10-21 12:11:28 -06:00
parent e85e613978
commit d5fde04d09
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
2 changed files with 4 additions and 11 deletions

View file

@ -125,7 +125,7 @@ fn main() {
continue; continue;
} }
log::debug!("Insert {:?}", c); log::trace!("Insert {:?}", c);
// Test backspace of character // Test backspace of character
{ {
@ -135,16 +135,14 @@ fn main() {
assert_eq!(cursor, buffer.cursor()); assert_eq!(cursor, buffer.cursor());
} }
/*TODO // Test delete of character
// Test delete of character (DOES NOT SUPPORT RTL)
{ {
let cursor = buffer.cursor(); let cursor = buffer.cursor();
buffer.action(TextAction::Insert(c)); buffer.action(TextAction::Insert(c));
buffer.action(TextAction::Left); buffer.action(TextAction::Previous);
buffer.action(TextAction::Delete); buffer.action(TextAction::Delete);
assert_eq!(cursor, buffer.cursor()); assert_eq!(cursor, buffer.cursor());
} }
*/
// Finally, normal insert of character // Finally, normal insert of character
buffer.action(TextAction::Insert(c)); buffer.action(TextAction::Insert(c));
@ -158,17 +156,14 @@ fn main() {
assert_eq!(cursor, buffer.cursor()); assert_eq!(cursor, buffer.cursor());
} }
/*TODO
// Test delete of newline // Test delete of newline
{ {
let cursor = buffer.cursor(); let cursor = buffer.cursor();
buffer.action(TextAction::Enter); buffer.action(TextAction::Enter);
buffer.action(TextAction::Up); buffer.action(TextAction::Previous);
buffer.action(TextAction::End);
buffer.action(TextAction::Delete); buffer.action(TextAction::Delete);
assert_eq!(cursor, buffer.cursor()); assert_eq!(cursor, buffer.cursor());
} }
*/
// Finally, normal enter // Finally, normal enter
buffer.action(TextAction::Enter); buffer.action(TextAction::Enter);

View file

@ -840,8 +840,6 @@ impl<'a> TextBuffer<'a> {
} }
}; };
println!("x: {}", x);
f( f(
x, x,
line_y - font_size, line_y - font_size,