ParseSplitPaneIntoArgs unit test is failing #4437
Labels
Area-CodeHealth
Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.
Area-Commandline
wt.exe's commandline arguments
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Needs-Tag-Fix
Doesn't match tag requirements
Product-Terminal
The new Windows Terminal.
Milestone
Environment
Windows build number: Version 10.0.18362.535
Windows Terminal version (if applicable): Commit 55b6388
Steps to reproduce
runut.cmd
script.Expected behavior
All the tests should pass.
Actual behavior
The
CommandlineTest::ParseSplitPaneIntoArgs
test fails on line 593 with the message:That particular error looks to me like a mistake in the test itself. If the command line doesn't include a specific style, I would expect the style to be
SplitState::Automatic
. I'm guessing this is the result of a change in behavior as the code evolved. And I believe the tests on line 653 and line 707 will fail for the same reason.Even with those cases fixed, though, there is still a failure which I think is an indication of a real bug in the code. The test on line 633 is failing because it's expecting the style to be
Vertical
but the return value isAutomatic
. The code that is to blame is in theAppCommandlineArgs::_buildSplitPaneParser
method:terminal/src/cascadia/TerminalApp/AppCommandlineArgs.cpp
Lines 220 to 230 in b6ec670
There are two problems with this code. The first is that the initial branch isn't even passed unless
_splitHorizontal
is true, so the_splitVertical
case is never handled. The second is that even with that fixed, the_splitVertical
case will end up setting the style toHorizontal
rather thanVertical
.The text was updated successfully, but these errors were encountered: