test/system: Tighten the regular expression used to check the version

The MAJOR version will always be 0, the MINOR version can't be 0 after
the release of 0.1.0; until 1.0.0 or 1.0 is released, which won't happen
in the short-term future.  Similarly, the MICRO version can't be 0 after
the release of 0.1.1, until 0.2.0 is released.

Future releases will default to not having a MICRO version and use a
MAJOR.MINOR versioning scheme.  A MICRO version will be reserved for the
same purposes that a NANO version was reserved for until now, and it
will never be 0.

Tighten the regular expression used to check the version to match this
present reality.  It can be revisited when 1.0 is eventually released.

https://github.com/containers/toolbox/pull/1703
This commit is contained in:
Debarshi Ray 2025-08-08 21:16:13 +02:00
parent e2dda19349
commit b7e70e28c4
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# shellcheck shell=bats
#
# Copyright © 2019 2024 Red Hat, Inc.
# Copyright © 2019 2025 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -29,7 +29,7 @@ setup() {
run --separate-stderr "$TOOLBX" --version
assert_success
assert_output --regexp '^toolbox version [0-9]+\.[0-9]+(\.[0-9]+)?$'
assert_output --regexp '^toolbox version 0\.[1-9][0-9]*(\.[1-9][0-9]*)?$'
assert [ ${#lines[@]} -eq 1 ]
# shellcheck disable=SC2154