|
214 | 214 | assert_eq!(out, expected, "\nactual:\n{}\nexpected:\n{}", out, expected);
|
215 | 215 | }
|
216 | 216 |
|
217 |
| -/////////////////////////////////////////////////////////////////////////////// |
218 |
| -// rebase-with-intermediates tests |
219 |
| - |
220 |
| -#[test] |
221 |
| -fn test_rebase_with_intermediates() { |
222 |
| - let td = assert_fs::TempDir::new().unwrap(); |
223 |
| - git_init(&td); |
224 |
| - |
225 |
| - git_commits(&["a", "b", "c"], &td); |
226 |
| - git(&["checkout", "-b", "int_1", ":/b"], &td); |
227 |
| - git_commits(&["d", "e"], &td); |
228 |
| - git(&["checkout", "-b", "int_2"], &td); |
229 |
| - |
230 |
| - git_commits(&["f", "g"], &td); |
231 |
| - |
232 |
| - git(&["checkout", "-b", "changes"], &td); |
233 |
| - |
234 |
| - git_commits(&["h", "i"], &td); |
235 |
| - |
236 |
| - let out = git_log(&td); |
237 |
| - let expected = "\ |
238 |
| -* i HEAD -> changes |
239 |
| -* h |
240 |
| -* g int_2 |
241 |
| -* f |
242 |
| -* e int_1 |
243 |
| -* d |
244 |
| -| * c main |
245 |
| -|/ |
246 |
| -* b |
247 |
| -* a |
248 |
| -"; |
249 |
| - assert_eq!( |
250 |
| - out, expected, |
251 |
| - "pre rebase\nactual:\n{}\nexpected:\n{}", |
252 |
| - out, expected |
253 |
| - ); |
254 |
| - |
255 |
| - if let Err(e) = rebase("main", &td).ok() { |
256 |
| - panic!("ERROR: {}", e); |
257 |
| - } |
258 |
| - |
259 |
| - let out = git_log(&td); |
260 |
| - let expected = "\ |
261 |
| -* i HEAD -> changes |
262 |
| -* h |
263 |
| -* g int_2 |
264 |
| -* f |
265 |
| -* e int_1 |
266 |
| -* d |
267 |
| -* c main |
268 |
| -* b |
269 |
| -* a |
270 |
| -"; |
271 |
| - assert_eq!(out, expected, "\nactual:\n{}\nexpected:\n{}", out, expected); |
272 |
| -} |
273 |
| - |
274 | 217 | ///////////////////////////////////////////////////////////////////////////////
|
275 | 218 | // Helpers
|
276 | 219 |
|
|
0 commit comments