This is an automated email from the ASF dual-hosted git repository.

sjanc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git

commit 31d7d122324981a567095e1d83b675de11a3cb52
Author: Szymon Janc <[email protected]>
AuthorDate: Fri Oct 9 15:18:51 2026 +0200

    newt/cli: Handle trailing slash in excluded test packages
    
    "newt test all -e foo/bar/" didn't exclude anything since the
    excluded name was compared as is. Trim trailing slash, as done
    when resolving package names.
    
    Assisted-by: Claude:claude-opus-5-5
---
 newt/cli/build_cmds.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/newt/cli/build_cmds.go b/newt/cli/build_cmds.go
index 2431850d..f52c4bc8 100644
--- a/newt/cli/build_cmds.go
+++ b/newt/cli/build_cmds.go
@@ -318,6 +318,8 @@ func testRunCmd(cmd *cobra.Command, args []string, exclude 
string, executeShell
        packLoop:
                for _, pack := range orig {
                        for _, excl := range excls {
+                               // Trim trailing slash, e.g. added by tab 
completion.
+                               excl = strings.TrimSuffix(excl, "/")
                                if pack.Name() == excl ||
                                        strings.HasPrefix(pack.Name(), 
excl+"/") ||
                                        pack.NameWithRepo() == excl ||

Reply via email to