Commit 285e151 greg
committed
1 parent bc8df20 commit 285e151 Copy full SHA for 285e151
File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -131,3 +131,29 @@ async fn test_selection_duplication() -> anyhow::Result<()> {
131
131
. await ?;
132
132
Ok ( ( ) )
133
133
}
134
+
135
+ #[ tokio:: test]
136
+ async fn increment_integer_test ( ) -> anyhow:: Result < ( ) > {
137
+ // correct selection placement with multiple -1 to zero
138
+ // `-1-1-2-1-1` becomes `00-100`
139
+ test ( (
140
+ "#[-|]#1#(-|)#1#(-|)#2#(-|)#1#(-|)#1" ,
141
+ "<C-a>" ,
142
+ "#[0|]##(0|)##(-|)#1#(0|)##(0|)#" ,
143
+ ) )
144
+ . await ?;
145
+
146
+ // correct selection placement with multiple -1 to zero, incremented twice
147
+ // `-1-1-2-1-1` becomes `00-100` then `01-99`
148
+ test ( (
149
+ "#[-|]#1#(-|)#1#(-|)#2#(-|)#1#(-|)#1" ,
150
+ "<C-a><C-a>" ,
151
+ "#[0|]#1#(-|)#99" ,
152
+ ) )
153
+ . await ?;
154
+
155
+ // correct selection placement with multiple 9 to 10
156
+ // `9 9 9` becomes `10 10 10`
157
+ test ( ( "#[9|]# #(9|)# #(9|)#" , "<C-a>" , "#[1|]#0 #(1|)#0 #(1|)#0" ) ) . await ?;
158
+ Ok ( ( ) )
159
+ }
You can’t perform that action at this time.
0 commit comments