Skip to content

Commit 5e0c01e

Browse files
committed
rebase -i
1 parent 4fcef6d commit 5e0c01e

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

src/main.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,19 @@ fn create_build_steps() -> BuildStepper {
113113
// },
114114
//);
115115
build_stepper.add_step(
116+
"rebase -i",
117+
|_repo: &git2::Repository, _next: String| Err(NotImplemented),
118+
|_, _prev_out| {
119+
let ri_cmd = get_sh_codeblock("interactive-rebase.md").unwrap();
120+
assert!(exec(&format!("GIT_SEQUENCE_EDITOR='../test_helpers/interactive-rebase-sequence-editor.sh' {ri_cmd}")), "interactive rebase should succeed");
121+
assert!(
122+
file_contains("cherry-pick.md", "nuggit: SatisfactionThroughInteraction").unwrap(),
123+
"interactive-rebase should show nuggit"
124+
);
125+
assert!(redeem_nuggit("SatisfactionThroughInteraction"));
126+
None
127+
},
128+
).add_step(
116129
"cherry-pick",
117130
|_repo: &git2::Repository, _next: String| Err(NotImplemented),
118131
|_, _prev_out| {

test_cargo.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,6 @@ expect 'echo "\$rebase_output"' not to contain "nuggit: AddTheTopOfYourGame"
196196
redeem_nuggit ItsAllAboutTheRebase
197197
EOF
198198

199-
it 'chapter interactive rebase' <<EOF
200-
expect 'GIT_SEQUENCE_EDITOR="$DOCDIR/../test_helpers/interactive-rebase-sequence-editor.sh" \$(get_sh_codeblock interactive-rebase.md) 2>&1' to succeed
201-
expect 'cat cherry-pick.md' to contain "nuggit: SatisfactionThroughInteraction"
202-
redeem_nuggit SatisfactionThroughInteraction
203-
EOF
204-
205199
cargo test -- --nocapture
206200

207201
it 'An invalid nuggit should show an error' '

0 commit comments

Comments
 (0)