terminal/tools
Mike Griese 53c81a08f8
Return to ground when we flush the last char (#2823)
## Summary of the Pull Request
The InputStateMachineEngine was incorrectly not returning to the ground state after flushing the last sequence. That means that something like alt+backspace would leave us in the Escape state, not the ground state. This makes sure we return to ground.

Additionally removes the "Parser.UnitTests-common.vcxproj" file, which was originally used for a theoretical time when we only open-sourced the parser. It's unnecessary now, and we can get rid of it.

Also includes a small patch to bcz.cmd, to make sure bx works with projects with a space in their name.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [x] Closes #2746
* [x] I work here
* [x] Tests added/passed
* [n/a] Requires documentation to be updated


<hr>

* Return to ground when we flush the last char

  The InputStateMachineEngine was incorrectly not returning to the ground state
  after flushing the last sequence. That means that something like alt+backspace
  would leave us in the Escape state, not the ground state. This makes sure we
  return to ground.

  Fixes #2746.

  Additionally removes the "Parser.UnitTests-common.vcxproj" file, which was
  originally used for a theoretical time when we only open-sourced the parser.
  It's unnecessary now, and we can get rid of it.

  Also includes a small patch to bcz.cmd, to make sure bx works with projects
  with a space in their name.

* Update src/terminal/parser/stateMachine.cpp

Co-Authored-By: Dustin L. Howett (MSFT) <duhowett@microsoft.com>

* add the comment @miniksa wanted
2019-10-04 10:47:39 -05:00
..
bcx.cmd Create bx.cmd (#2168) 2019-08-05 20:18:40 -05:00
bcz.cmd Return to ground when we flush the last char (#2823) 2019-10-04 10:47:39 -05:00
bx.cmd Create bx.cmd (#2168) 2019-08-05 20:18:40 -05:00
bx.ps1 Prevent the v1 propsheet from zeroing colors, causing black text on black background. (#2651) 2019-10-02 16:04:59 -07:00
bz.cmd Create bx.cmd (#2168) 2019-08-05 20:18:40 -05:00
ConsoleTypes.natvis Improve debugging experience of key events (#2872) 2019-09-24 13:50:53 -07:00
echokey.cmd make copying of files windows localization agnostic (#741) 2019-05-21 16:25:54 +00:00
GenerateAppxFromManifest.ps1 Add a Local Test binary, to enable local TerminalApp testing (#2294) 2019-08-13 08:23:28 -05:00
GenerateHeaderForJson.ps1 Add Cascading User + Default Settings (#2515) 2019-09-16 12:57:10 -07:00
openbash.cmd Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
opencon.cmd Prevent the v1 propsheet from zeroing colors, causing black text on black background. (#2651) 2019-10-02 16:04:59 -07:00
OpenConsole.psm1 Add a Local Test binary, to enable local TerminalApp testing (#2294) 2019-08-13 08:23:28 -05:00
openps.cmd Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
openvt.cmd make copying of files windows localization agnostic (#741) 2019-05-21 16:25:54 +00:00
razzle.cmd Fix test runner commands (runut.cmd and friends; Invoke-OpenConsoleTests) (#2020) 2019-07-18 09:31:25 -07:00
README.md add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
runformat.cmd add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
runft.cmd Turn on Text Buffer unit tests in Azure DevOps CI build (#1057) 2019-05-29 19:51:17 -07:00
runuia.cmd Turn on Text Buffer unit tests in Azure DevOps CI build (#1057) 2019-05-29 19:51:17 -07:00
runut.cmd Add a Local Test binary, to enable local TerminalApp testing (#2294) 2019-08-13 08:23:28 -05:00
testcon.cmd Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
tests.xml Add a Local Test binary, to enable local TerminalApp testing (#2294) 2019-08-13 08:23:28 -05:00
vso_ut.cmd Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
WindbgExtension.js Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00

OpenConsole Tools

These are a collection of tools and scripts to make your life building the OpenConsole project easier. Many of them are designed to be functional clones of tools that we used to use when developing inside the Windows build system.

Razzle

This is a script that quickly sets up your environment variables so that these tools can run easily. It's named after another script used by Windows developers to similar effect.

  • It adds msbuild to your path.
  • It adds the tools directory to your path as well, so all these scripts are easily available.
  • It executes \tools\.razzlerc.cmd to add any other personal configuration to your environment as well, or creates one if it doesn't exist.
  • It sets up the default build configuration to be 'Debug'. If you'd like to manually specify a build configuration, pass the parameter dbg for Debug, and rel for Release.

bcz

bcz can quick be used to clean and build the project. By default, it builds the %DEFAULT_CONFIGURATION% configuration, which is Debug if you use razzle.cmd.

  • bcz dbg can be used to manually build the Debug configuration.
  • bcz rel can be used to manually build the Release configuration.

opencon (and openbash, openps)

opencon can be used to launch the last built OpenConsole binary. If given an argument, it will try and run that program in the launched window. Otherwise it will default to cmd.exe.

openbash is similar, it immediately launches bash.exe (the Windows Subsystem for Linux entrypoint) in your ~ directory.

Likewise, openps launches powershell.

runformat

runformat will format the c++ code to match our coding style.

testcon, runut, runft

runut will automatically run all of the unit tests through TAEF. runft will run the feature tests, and testcon runs all of them. They'll pass any arguments through to TAEF, so you can more finely control the testing.

A recommended workflow is the following command:

bcz dbg && runut /name:*<name of test>*

Where <name of test> is the name of the test testing the relevant feature area you're working on. For example, if I was working on the VT Mouse input support, I would use MouseInputTest as that string, to isolate the mouse input tests. If you'd like to run all the tests, just ignore the /name param: bcz dbg && runut

To make sure your code is ready for a pull request, run the build, then launch the built console, then run the tests in it. The built console will inherit all of the razzle environment, so you can immediately start using the macros:

  1. bcz
  2. opencon
  3. testcon (in the new console window)
  4. runformat

If they all come out green, then you're ready for a pull request!