Add cursor moving #19
19 changed files with 2 additions and 2 deletions
Move tests
commit
5ed7e0ad3a
|
|
@ -385,7 +385,7 @@ mod test {
|
||||||
let files = [file_name_1, file_name_2, file_name_3];
|
let files = [file_name_1, file_name_2, file_name_3];
|
||||||
let permutations = [range_1, range_2, range_3];
|
let permutations = [range_1, range_2, range_3];
|
||||||
|
|
||||||
let root = Path::new("test/resources/");
|
let root = Path::new("tests/resources/");
|
||||||
|
|
||||||
let contents = files
|
let contents = files
|
||||||
.iter()
|
.iter()
|
||||||
|
|
|
||||||
6
backend/reconcile/tests/examples/1.yml
Normal file
6
backend/reconcile/tests/examples/1.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
# The `|` characters denote cursor positions which are stripped before the actual reconcile logic is run
|
||||||
|
---
|
||||||
|
parent: You're Annual Savings Statement is available in our online portal
|
||||||
|
left: Your| annual record is available in our online portal|
|
||||||
|
right: You're Annual Savings information| is available online
|
||||||
|
expected: Your| annual record information| is available online|
|
||||||
5
backend/reconcile/tests/examples/10.yml
Normal file
5
backend/reconcile/tests/examples/10.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
parent: marketplace
|
||||||
|
left: market| place
|
||||||
|
right: market|space
|
||||||
|
expected: market| placemarket|space
|
||||||
|
|
||||||
4
backend/reconcile/tests/examples/11.yml
Normal file
4
backend/reconcile/tests/examples/11.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
parent: Please remember to bring your laptop and charger
|
||||||
|
left: Please remember to bring your laptop|
|
||||||
|
right: Please remember to bring your |new |laptop and charger
|
||||||
|
expected: Please remember to bring your |new |laptop|
|
||||||
4
backend/reconcile/tests/examples/12.yml
Normal file
4
backend/reconcile/tests/examples/12.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
parent: Party A shall pay Party B
|
||||||
|
left: Party C shall pay Party B
|
||||||
|
right: Party A shall receive from Party B
|
||||||
|
expected: Party C shall receive from Party B
|
||||||
4
backend/reconcile/tests/examples/13.yml
Normal file
4
backend/reconcile/tests/examples/13.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
parent: Please submit your assignment by Friday
|
||||||
|
left: Please submit your |completed |assignment by Friday
|
||||||
|
right: Please submit your assignment |online |by Friday
|
||||||
|
expected: Please submit your |completed |assignment |online |by Friday
|
||||||
4
backend/reconcile/tests/examples/2.yml
Normal file
4
backend/reconcile/tests/examples/2.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
parent:
|
||||||
|
left: hi my friend|
|
||||||
|
right: hi there|
|
||||||
|
expected: hi my friend| there|
|
||||||
4
backend/reconcile/tests/examples/3.yml
Normal file
4
backend/reconcile/tests/examples/3.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
parent: Buy milk and eggs
|
||||||
|
left: Buy organic milk| and eggs|
|
||||||
|
right: Buy milk and eggs| and bread
|
||||||
|
expected: Buy organic milk| and eggs|| and bread
|
||||||
4
backend/reconcile/tests/examples/4.yml
Normal file
4
backend/reconcile/tests/examples/4.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
parent: Meeting at 2pm in 会议室
|
||||||
|
left: Meeting at |3pm in the 会议室
|
||||||
|
right: Team meeting at 2pm in conference room|
|
||||||
|
expected: Team meeting at |3pm in conference room| the
|
||||||
4
backend/reconcile/tests/examples/5.yml
Normal file
4
backend/reconcile/tests/examples/5.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
parent: Send the report to the team
|
||||||
|
left: Send the |detailed |report to the |entire |team
|
||||||
|
right: Send the |quarterly |detailed |report to the team
|
||||||
|
expected: Send the |detailed |quarterly |detailed ||report to the |entire |team
|
||||||
4
backend/reconcile/tests/examples/6.yml
Normal file
4
backend/reconcile/tests/examples/6.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
parent: Ready, Set go
|
||||||
|
left: Ready! Set go|
|
||||||
|
right: Ready, Set, go!|
|
||||||
|
expected: Ready! Set, go!||
|
||||||
4
backend/reconcile/tests/examples/7.yml
Normal file
4
backend/reconcile/tests/examples/7.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
parent: "Total: $100"
|
||||||
|
left: "Total: |$150"
|
||||||
|
right: "Total: |€100"
|
||||||
|
expected: "Total: |$150 |€100"
|
||||||
4
backend/reconcile/tests/examples/8.yml
Normal file
4
backend/reconcile/tests/examples/8.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
parent: Start middle end
|
||||||
|
left: Start [important] middle end|
|
||||||
|
right: Start middle [critical] end|
|
||||||
|
expected: Start [important] middle [critical] end||
|
||||||
4
backend/reconcile/tests/examples/9.yml
Normal file
4
backend/reconcile/tests/examples/9.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
parent: A B C D
|
||||||
|
left: A X B D|
|
||||||
|
right: A B Y|
|
||||||
|
expected: A X B Y||
|
||||||
6438
backend/reconcile/tests/resources/kun_lu.txt
Normal file
6438
backend/reconcile/tests/resources/kun_lu.txt
Normal file
File diff suppressed because it is too large
Load diff
14910
backend/reconcile/tests/resources/pride_and_prejudice.txt
Normal file
14910
backend/reconcile/tests/resources/pride_and_prejudice.txt
Normal file
File diff suppressed because it is too large
Load diff
5646
backend/reconcile/tests/resources/romeo_and_juliet.txt
Normal file
5646
backend/reconcile/tests/resources/romeo_and_juliet.txt
Normal file
File diff suppressed because it is too large
Load diff
9105
backend/reconcile/tests/resources/room_with_a_view.txt
Normal file
9105
backend/reconcile/tests/resources/room_with_a_view.txt
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -6,7 +6,7 @@ use reconcile::{reconcile, reconcile_with_cursors};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_with_examples() {
|
fn test_with_examples() {
|
||||||
let examples_dir = Path::new("test/examples");
|
let examples_dir = Path::new("tests/examples");
|
||||||
let mut entries = fs::read_dir(examples_dir)
|
let mut entries = fs::read_dir(examples_dir)
|
||||||
.expect("Failed to read examples directory")
|
.expect("Failed to read examples directory")
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue