public void CurrentStep()
{
var pipeline = new CompilerPipeline();
var step1 = new ActionStep(delegate {});
pipeline.Add(step1);
ActionStep step2 = null;
step2 = new ActionStep(() => Assert.AreSame(step2, pipeline.CurrentStep));
pipeline.Add(step2);
var currentSteps = new Boo.Lang.List();
pipeline.Before += (sender, args) => currentSteps.Add(pipeline.CurrentStep);
pipeline.BeforeStep += (sender, args) => currentSteps.Add(pipeline.CurrentStep);
pipeline.AfterStep += (sender, args) => currentSteps.Add(pipeline.CurrentStep);
pipeline.After += (sender, args) => currentSteps.Add(pipeline.CurrentStep);
pipeline.Run(new CompilerContext());
Assert.AreEqual(
new object[] { null, step1, step1, step2, step2, null },
currentSteps.ToArray());
}