From 45ac9fa504354f71fc2e54f358f67b318950c459 Mon Sep 17 00:00:00 2001 From: CrimsonVoid Date: Mon, 2 Feb 2026 12:22:31 -0600 Subject: [PATCH 1/3] Include run in list of common commands Signed-off-by: CrimsonVoid --- src/cmd/utils.go | 1 + test/system/002-help.bats | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/cmd/utils.go b/src/cmd/utils.go index 885cf7252..75336014c 100644 --- a/src/cmd/utils.go +++ b/src/cmd/utils.go @@ -387,6 +387,7 @@ func getUsageForCommonCommands() string { var builder strings.Builder builder.WriteString("create Create a new Toolbx container\n") builder.WriteString("enter Enter an existing Toolbx container\n") + builder.WriteString("run Run a command in an existing Toolbx container\n") builder.WriteString("list List all existing Toolbx containers and images\n") usage := builder.String() diff --git a/test/system/002-help.bats b/test/system/002-help.bats index 0df1af01e..82e91023a 100644 --- a/test/system/002-help.bats +++ b/test/system/002-help.bats @@ -42,7 +42,8 @@ teardown_file() { assert_line --index 0 "Error: missing command" assert_line --index 2 "create Create a new Toolbx container" assert_line --index 3 "enter Enter an existing Toolbx container" - assert_line --index 4 "list List all existing Toolbx containers and images" + assert_line --index 4 "run Run a command in an existing Toolbx container" + assert_line --index 5 "list List all existing Toolbx containers and images" assert_line --index 6 "Run 'toolbox --help' for usage." assert [ ${#stderr_lines[@]} -eq 7 ] } @@ -74,8 +75,9 @@ teardown_file() { assert_line --index 2 "Common commands are:" assert_line --index 3 "create Create a new Toolbx container" assert_line --index 4 "enter Enter an existing Toolbx container" - assert_line --index 5 "list List all existing Toolbx containers and images" - assert_line --index 7 "Go to https://containertoolbx.org/ for further information." + assert_line --index 5 "run Run a command in an existing Toolbx container" + assert_line --index 6 "list List all existing Toolbx containers and images" + assert_line --index 8 "Go to https://containertoolbx.org/ for further information." assert [ ${#lines[@]} -eq 8 ] assert [ ${#stderr_lines[@]} -eq 0 ] } @@ -107,8 +109,9 @@ teardown_file() { assert_line --index 2 "Common commands are:" assert_line --index 3 "create Create a new Toolbx container" assert_line --index 4 "enter Enter an existing Toolbx container" - assert_line --index 5 "list List all existing Toolbx containers and images" - assert_line --index 7 "Go to https://containertoolbx.org/ for further information." + assert_line --index 5 "run Run a command in an existing Toolbx container" + assert_line --index 6 "list List all existing Toolbx containers and images" + assert_line --index 8 "Go to https://containertoolbx.org/ for further information." assert [ ${#lines[@]} -eq 8 ] # shellcheck disable=SC2154 From 99e7861ef558114aa90c630aed3399ed1780cde7 Mon Sep 17 00:00:00 2001 From: CrimsonVoid Date: Mon, 2 Feb 2026 13:47:02 -0600 Subject: [PATCH 2/3] Fix line count in tests Signed-off-by: CrimsonVoid --- test/system/002-help.bats | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/system/002-help.bats b/test/system/002-help.bats index 82e91023a..526fe4a7a 100644 --- a/test/system/002-help.bats +++ b/test/system/002-help.bats @@ -45,7 +45,7 @@ teardown_file() { assert_line --index 4 "run Run a command in an existing Toolbx container" assert_line --index 5 "list List all existing Toolbx containers and images" assert_line --index 6 "Run 'toolbox --help' for usage." - assert [ ${#stderr_lines[@]} -eq 7 ] + assert [ ${#stderr_lines[@]} -eq 8 ] } @test "help: Command 'help'" { @@ -78,7 +78,7 @@ teardown_file() { assert_line --index 5 "run Run a command in an existing Toolbx container" assert_line --index 6 "list List all existing Toolbx containers and images" assert_line --index 8 "Go to https://containertoolbx.org/ for further information." - assert [ ${#lines[@]} -eq 8 ] + assert [ ${#lines[@]} -eq 9 ] assert [ ${#stderr_lines[@]} -eq 0 ] } @@ -112,7 +112,7 @@ teardown_file() { assert_line --index 5 "run Run a command in an existing Toolbx container" assert_line --index 6 "list List all existing Toolbx containers and images" assert_line --index 8 "Go to https://containertoolbx.org/ for further information." - assert [ ${#lines[@]} -eq 8 ] + assert [ ${#lines[@]} -eq 9 ] # shellcheck disable=SC2154 assert [ ${#stderr_lines[@]} -eq 0 ] From 0f1e88a51edd5b3ee2d84c0c62b32c1a46fc4ba0 Mon Sep 17 00:00:00 2001 From: CrimsonVoid Date: Mon, 2 Feb 2026 14:05:10 -0600 Subject: [PATCH 3/3] Fix failing test Signed-off-by: CrimsonVoid --- test/system/002-help.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/system/002-help.bats b/test/system/002-help.bats index 526fe4a7a..b86e0b34d 100644 --- a/test/system/002-help.bats +++ b/test/system/002-help.bats @@ -44,7 +44,7 @@ teardown_file() { assert_line --index 3 "enter Enter an existing Toolbx container" assert_line --index 4 "run Run a command in an existing Toolbx container" assert_line --index 5 "list List all existing Toolbx containers and images" - assert_line --index 6 "Run 'toolbox --help' for usage." + assert_line --index 7 "Run 'toolbox --help' for usage." assert [ ${#stderr_lines[@]} -eq 8 ] }