mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-05 06:30:28 +09:00
Improve buffer test
This commit is contained in:
@@ -85,7 +85,9 @@ func check(t *testing.T, before []string, operations []operation, after []string
|
||||
|
||||
checkText(after)
|
||||
|
||||
for b.UndoStack.Peek() != nil {
|
||||
// must have exactly two events per operation (delete and insert)
|
||||
for range operations {
|
||||
b.UndoOneEvent()
|
||||
b.UndoOneEvent()
|
||||
}
|
||||
|
||||
@@ -101,7 +103,8 @@ func check(t *testing.T, before []string, operations []operation, after []string
|
||||
}
|
||||
}
|
||||
|
||||
for b.RedoStack.Peek() != nil {
|
||||
for range operations {
|
||||
b.RedoOneEvent()
|
||||
b.RedoOneEvent()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user