Add language specs for removal of characters
This commit is contained in:
parent
ccb0d0d043
commit
75da0a5774
2 changed files with 17 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ x
|
|||
variables with greek letters
|
||||
====================================
|
||||
|
||||
φ1
|
||||
φ123
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,22 @@ describe("Languages", [&]() {
|
|||
|
||||
expect_the_correct_tree();
|
||||
});
|
||||
|
||||
it(("handles random deletions in " + entry.description).c_str(), [&]() {
|
||||
SpyReader reader(entry.input, 3);
|
||||
ts_document_set_input(doc, reader.input());
|
||||
|
||||
size_t position = entry.input.size() / 2;
|
||||
string removed = entry.input.substr(position);
|
||||
|
||||
reader.erase(position, removed.size());
|
||||
ts_document_edit(doc, { position, 0, removed.size() });
|
||||
|
||||
reader.insert(position, removed);
|
||||
ts_document_edit(doc, { position, removed.size(), 0 });
|
||||
|
||||
expect_the_correct_tree();
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue