Skip to content

Conversation

@filipw
Copy link
Member

@filipw filipw commented Mar 6, 2015

this is a rebased and slightly modded version of #823.
Adds :exit to REPL

seandgrimes and others added 5 commits March 6, 2015 12:30
Added new IRepl interface that inherits from IScriptExecutor and adds a new method named Quit

Updated the Execute method of IRepl to accept an instance of IRepl instead of IScriptExecutor

Updated Repl to implement IRepl and the new Quit method, which calls Terminate() and Environment.Exit(0)

Updated the Execute() method of the existing REPL commands to accept an instance of IRepl instead of IScriptExecutor

Added a new ExitCommand that uses the new Repl.Quit() method to exit the REPL

Updated RuntimeServices to bind IRepl to Repl

Updated existing REPL command tests to pass in a mock of IRepl to IReplCommand.Execute instead of a mock of IScriptExecutor

Added new tests to cover the new ExitCommand

Conflicts:
	src/ScriptCs.Contracts/IRepl.cs
	test/ScriptCs.Core.Tests/ReplCommands/CdCommandTests.cs
	test/ScriptCs.Core.Tests/ReplCommands/ClearCommandTests.cs
	test/ScriptCs.Core.Tests/ReplCommands/CwdCommandTests.cs
	test/ScriptCs.Core.Tests/ReplCommands/InstallCommandTests.cs
	test/ScriptCs.Core.Tests/ReplCommands/ResetCommandTests.cs
	test/ScriptCs.Core.Tests/ReplTests.cs
The PromptsUserBeforeExiting() unit test was eternal looping since the
Console.ReadLine() method was never stubbed to return a value
@khellang khellang added this to the v0.14 milestone Mar 6, 2015
khellang added a commit that referenced this pull request Mar 6, 2015
@khellang khellang merged commit 3a7624f into scriptcs:dev Mar 6, 2015
@adamralph
Copy link
Contributor

fixes #427

@adamralph
Copy link
Contributor

👍 nice! I've added #427 to the 0.14 release notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants