-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #11190 - epage:test, r=weihanglo
fix(test): Distinguish 'testname' from escaped arguments When working on clap v4, it appeared that `last` and `trailing_var_arg` are mutually exclusive, so I called that out in the debug asserts in #4187. Unfortunately, I didn't document my research on this as my focus was elsewhere. When updating cargo to use clap v4 in #11159, I found `last` and `trailing_var_arg` were used together. I figured this was what I was trying to catch with above and I went off of my intuitive sense of these commands and assumed `trailing_var_arg` was intended, not knowing about the `testname` positional that is mostly just a forward to `libtest`, there for documentation purposes, except for a small optimization. So it looks like we just need the `last` call and not the `trailing_var_arg` call. This restores us to behavior from 531ce13 which is what I originally wrote the tests against. It looks like #11159 was merged after the last beta branch was made, so we shouldn't need to cherry-pick this into any other release. For reviewing this, I made the test updates in the first commit, showing the wrong behavior. The following commit fixes the behavior and updates the tests to expected behavior. Fixes #11191
- Loading branch information
Showing
3 changed files
with
107 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters